Korvin Szanto
Korvin Szanto

Reputation: 4501

Drag kinetic elements beyond the canvas

You can drag things beyond the canvas area by binding the mousemove event to the window rather than the canvas, is there a way to do this with the kinetic.js API?

Upvotes: 0

Views: 175

Answers (1)

SoluableNonagon
SoluableNonagon

Reputation: 11755

This is do-able, but not with the kineticjs API.

First bind 'mouseout' to the canvas element. Then when you do dragstart on an element save it to a temporary variable. Then once you leave your canvas area, the mouseout is fired and you can read from the saved element. The real trick will be to 'convert' the item in kineticjs to an item which the outside DOM will recognize.

Upvotes: 1

Related Questions