Draw.js
"use strict";
exports.imgElementToImageSourceImpl = function(id, Just, Nothing) {
return function() {
var el = document.getElementById(id);
if (el && el instanceof HTMLImageElement) {
return Just(el);
} else {
return Nothing;
}
};
};
exports.imageShape = image => {
return { width: image.width, height: image.height };
}