Question

am making a Createjs and html5 project in which I am drawing a shape(Red circle), when I click over the circle it gives alert. It works fine on all desktops and android phones. Except when I open this in a windows phone it works fine on the normal screen but when I zoom the screen it loses it working, an alert is shown when I click anywhere on the screen(maybe where the co-ordinates of the shape resides) but not when I click over the shape(Circle),, Your help is appreciated

my demo.html

 <!DOCTYPE html>
    <html>
    <head><title></title>
    <script type="text/javascript" src="createjs-2013.12.12.min.js"></script>
    <script type="text/javascript" src="jquery-1.11.0.min.js"></script>
    <script type="text/javascript">
        function init() {
                var stage = new createjs.Stage("demoCanvas");
                var circle = new createjs.Shape();
                createjs.Touch.enable(stage);
                circle.graphics.beginFill("red").drawCircle(0, 0, 50);
                circle.x = 100;
                circle.y = 100;
                circle.addEventListener("click", function(evt) { /*$("span#log").text(circle.x);*/ alert('clicked'); });
                stage.addChild(circle);
                stage.update();

         }
    </script>
    </head>
    <body onLoad="init();">
        <span id="log"></span>
        <br>
        <canvas id="demoCanvas" width="500" height="300">
            alternate content
        </canvas>

    </body>
    </html>..

Here's the project

Was it helpful?

Solution 2

I do alot of Research over this topic, and at the end i came to this point that this the BUG in IE11 . Hope Microsoft helps to solve this.

OTHER TIPS

Not sure if this is relevant as haven't looked at sample code, but I think createjs.Touch.enable works on Stage instances rather than DisplayObjects

See here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top