-
Notifications
You must be signed in to change notification settings - Fork 188
Open
Description
Hi.
Is there a way for this to work with Angular?
I have the canvas set up in the view component. In the script component, I tried importing both jQuery and jCanvas using different methods, for example:
import * as $ from 'jQuery'; import * as jCanvas from 'jcanvas';
Then using different way to invoke it. An example would be:
jCanvas('#canvas') .addLayer({ type: 'image', name: 'bg', source: 'images/canvas/bg.png', x: 0, y: 0, width: 613, height: 905, fromCenter: false, }) .drawLayers();
Or:
$('#canvas') .addLayer({ type: 'image', name: 'bg', source: 'images/canvas/bg.png', x: 0, y: 0, width: 613, height: 905, fromCenter: false, }) .drawLayers();
But they all returns the error: $(...).addLayer is not a function.
Thank you.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels