pijul nest
guest [sign in]

Fork channel

Create a new channel as a copy of main.

Rename channel

Rename main to:

Delete channel

Delete main? This cannot be undone.

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 };
}