Skip to content

Can't bind fabric.js canvas to global variable #89

@serkyen

Description

@serkyen

I just discovered this package and would like to use it with Meteor APM.

In my app, I have a fabric.js canvas.

I am having an issue where as soon as I add meteorhacks:zones package, the canvas no longer works because for some reason, this package doesn't allow binding the canvas element to a variable.

So before adding meteorhacks:zones package, this works...

var canvas = new fabric.Canvas('c');

After adding meteorhacks:zones package, I get this error...

Error: Cannot read property '_bound' of undefined TypeError: Cannot read property '_bound' of undefined at removeListener (modules.js?hash=16b9ea92d34289051e08ade6ca413c8dd3855480:524509) at klass.addOrRemove (modules.js?hash=16b9ea92d34289051e08ade6ca413c8dd3855480:533308) at klass.removeListeners (modules.js?hash=16b9ea92d34289051e08ade6ca413c8dd3855480:533324) at klass._initEventListeners (modules.js?hash=16b9ea92d34289051e08ade6ca413c8dd3855480:533291) at klass._initInteractive (modules.js?hash=16b9ea92d34289051e08ade6ca413c8dd3855480:531865) at klass.initialize (modules.js?hash=16b9ea92d34289051e08ade6ca413c8dd3855480:531590) at new klass (modules.js?hash=16b9ea92d34289051e08ade6ca413c8dd3855480:524395) at Canvas.js:79

Canvas.js:79 is this line...
var canvas = new fabric.Canvas('c');

The unusual thing is that this seems to work ok...
var canvas = new fabric.StaticCanvas('c');

Of course now the canvas is not interactive.

Any ideas why this would be happening?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions