Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
serkyen opened this issue Oct 3, 2019 · 0 comments
Open

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

serkyen opened this issue Oct 3, 2019 · 0 comments

Comments

@serkyen
Copy link

serkyen commented Oct 3, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant