GithubHelp home page GithubHelp logo

casualjs's People

Contributors

flashlizi avatar iwege avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

casualjs's Issues

EventManager.js issue

In EventManager.js Line 79 - Line 99. The logic of removeEventListener is not correct. The variable "empty" is not set correctly.

sample fix:

var lid = EventManager._listeners[listener];
var count = 0, toremove = [];
for(var id in map){
if (id == lid){
toreomove.push(id);
}
count ++;
}
if (toremove.length > 0){
delete EventManager._listeners[listener];
delete map[toremove[0]]
count = count -1;
}
if(count == 0){
delete EventManager._maps[type][srcid];
delete EventManager._sources[src];
}

how to make Shape respond to mouse event

我尝试画一个矩形(或任意多边形),然后希望当鼠标在矩形内部点击时,可以做某些操作。
请帮忙看一下下面的代码有什么问题。

var canvas = document.getElementById('canvas'),
context = canvas.getContext("2d"),
stage = new Stage(context);

stage.traceMouseTarget = true;

var section1 = new Shape();
section1.graphics.lineStyle(5, "#cccccc");
section1.graphics.drawRect(20,100, 55, 110);
stage.addChild(section1);

section1.onMouseEvent = function(evnet){
console.log('onMouseEvent');
console.log(event);
}

Touch events

HI all,

Can we register touch events for mobile support. I am looking this frame work for mobile support by using phone gap.

Thanks In advance,
Pavan R

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.