Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var image = require("../../element").image
var map = require("../../signal/map")
var MousePosition = require("../../input").MousePosition
var render = require("../../render")
var edgeLength = map(MousePosition(), function (pos) {
return Math.max(100, Math.max(pos.x, pos.y))
})
var main = map(edgeLength, function resizableYogi(edgeLength) {
return image(edgeLength, edgeLength, "http://elm-lang.org/yogi.jpg")
})
render(main, false)
// =>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.