Highlighted

createjs.Touch.enable(stage, false, true) Doesn't Work!!

New Here ,
Dec 10, 2019

Copy link to clipboard

Copied

I'd like to touch enabled while still able to scroll, zoom when "initial touch" was on canvas (like normal canvas). 

...To be clear, I don't mean scrolling inside canvas. What I mean is to be able to scroll whole page, although the canvas just a small area (just in case when the user want to scroll he touch the canvas first).

 

From documentation, the 3rd param (allowDefault) seems to be the one.  But it doesn't work!!??

* @param {Stage} stage The {{#crossLink "Stage"}}{{/crossLink}} to enable touch on.
* @param {Boolean} [singleTouch=false] If `true`, only a single touch will be active at a time.
* @param {Boolean} [allowDefault=false] If `true`, then default gesture actions (ex. scrolling, zooming) will be
* allowed when the user is interacting with the target canvas.

TOPICS
Code, Error, How to, Missing feature, Product issue, Publish package

Views

73

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

createjs.Touch.enable(stage, false, true) Doesn't Work!!

New Here ,
Dec 10, 2019

Copy link to clipboard

Copied

I'd like to touch enabled while still able to scroll, zoom when "initial touch" was on canvas (like normal canvas). 

...To be clear, I don't mean scrolling inside canvas. What I mean is to be able to scroll whole page, although the canvas just a small area (just in case when the user want to scroll he touch the canvas first).

 

From documentation, the 3rd param (allowDefault) seems to be the one.  But it doesn't work!!??

* @param {Stage} stage The {{#crossLink "Stage"}}{{/crossLink}} to enable touch on.
* @param {Boolean} [singleTouch=false] If `true`, only a single touch will be active at a time.
* @param {Boolean} [allowDefault=false] If `true`, then default gesture actions (ex. scrolling, zooming) will be
* allowed when the user is interacting with the target canvas.

TOPICS
Code, Error, How to, Missing feature, Product issue, Publish package

Views

74

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 10, 2019 0

Have something to add?

Join the conversation