flashlizi / casualjs Goto Github PK
View Code? Open in Web Editor NEWA canvas graphic rendering framework
Home Page: www.riaidea.com
License: Apache License 2.0
A canvas graphic rendering framework
Home Page: www.riaidea.com
License: Apache License 2.0
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];
}
我尝试画一个矩形(或任意多边形),然后希望当鼠标在矩形内部点击时,可以做某些操作。
请帮忙看一下下面的代码有什么问题。
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);
}
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
在 DisplayObjectContainer 的86行,对child.stage = null的操作将使得runner的WeaponTool清空自己的stage,会使得第二次的点击出现问题。
目前解决方案是在需要weaponTool的时候再new一个新的(当前使用的),或者去掉这个赋值。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.