added drawScene() method which only redraws the scene and not the buffer

This commit is contained in:
Eric Rowell
2012-08-16 23:22:07 -07:00
parent e6e488025e
commit f53c43d4f7
4 changed files with 22 additions and 5 deletions

View File

@@ -4738,8 +4738,7 @@ Test.prototype.tests = {
y: 10
});
var mapLayer = new Kinetic.Layer();
var mapCanvas = mapLayer.getCanvas();
for(var key in worldMap.shapes) {
var c = worldMap.shapes[key];
@@ -4755,12 +4754,12 @@ Test.prototype.tests = {
path.on('mouseover', function() {
this.setFill('red');
mapLayer.draw(mapCanvas);
mapLayer.drawScene();
});
path.on('mouseout', function() {
this.setFill('#ccc');
mapLayer.draw(mapCanvas);
mapLayer.drawScene();
});
mapLayer.add(path);