fixed up Canvas type bug. The Canvas constructor can now also take an optional isBuffer param. If not defined, default value is scene

This commit is contained in:
Eric Rowell
2012-11-13 22:16:36 -08:00
parent 8486cb943f
commit 2115920ab8
6 changed files with 19 additions and 11 deletions

View File

@@ -72,8 +72,6 @@ Test.prototype = {
// loop through modules
for(var mod in modules) {
console.log('=================== ' + mod + ' TESTS ===================');
var tests = modules[mod];
/*
* if a test key has a star in front of it, then
@@ -86,6 +84,13 @@ Test.prototype = {
break;
}
}
};
// loop through modules
for(var mod in modules) {
console.log('=================== ' + mod + ' TESTS ===================');
var tests = modules[mod];
// loop through tests
for(var key in tests) {

View File

@@ -622,7 +622,7 @@ Test.Modules.NODE = {
clone.start();
};
imageObj.src = '../assets/scorpion-sprite.png';
},
},
'node caching': function(containerId) {
var stage = new Kinetic.Stage({
container: containerId,
@@ -668,6 +668,8 @@ Test.Modules.NODE = {
width: 500,
height: 300,
callback: function(imageObj) {
//document.body.appendChild(imageObj)
test(Kinetic.Type._isElement(imageObj), 'shape toImage() should be an image object');
var cachedShape = new Kinetic.Image({
@@ -694,6 +696,7 @@ Test.Modules.NODE = {
}
});
/*
group.toImage({
callback: function(imageObj) {
test(Kinetic.Type._isElement(imageObj), 'group toImage() should be an image object');
@@ -709,6 +712,7 @@ Test.Modules.NODE = {
test(Kinetic.Type._isElement(imageObj), 'stage toImage() should be an image object');
}
});
*/
//document.body.appendChild(layer.bufferCanvas.element)
},