New: Coordinate system documentation?

33 views
Skip to first unread message

Mike Mestnik

unread,
Aug 23, 2018, 4:33:53 AM8/23/18
to CreateJS Discussion
Attempt to bypass spam filtering.
https://pastebin.com/2APJMcCh

Mike Mestnik

unread,
Aug 26, 2018, 1:44:44 PM8/26/18
to CreateJS Discussion
I got the coordinate systems to match up.
http://jsfiddle.net/4eghdvmz/2/

The TLDR is:
$(function jQuery_load_main() {
  var canvas = document.getElementById("wires");
  var body = document.body;

  function body_resize() {
    var neww = body.scrollWidth;
    var newh = body.scrollHeight;
    if (canvas.width != neww) {
      canvas.width = neww;
      $(canvas).width(neww);
      if (canvas.height != newh) {
        canvas.height = newh;
        $(canvas).height(newh);
      }
      stage.update();
    } else if (canvas.height != newh) {
      canvas.height = newh;
      $(canvas).height(newh);
      stage.update();
    }
  }
  createjs.Ticker.on("tick", body_resize);
});

Sorry for the jQuery, it's possible to do this without the help.

Reply all
Reply to author
Forward
0 new messages