layer.toDataURL() now directly returns layer canvas data url if position and size are not specificed. updated unit tests and docs

This commit is contained in:
Eric Rowell
2013-01-02 22:02:00 -08:00
parent 31ad5fca88
commit 66a7e2ac39
6 changed files with 22 additions and 32 deletions

File diff suppressed because one or more lines are too long

View File

@@ -102,7 +102,7 @@ Test.prototype = {
if(key.charAt(0) !== '!' && (!testOnlySpecial || key.charAt(0) === '*')) {
var obj = this.addTestContainer(key);
this.counter++;
console.log(this.counter + ') ' + key);
console.log(this.counter + ') ' + mod + ' - ' + key);
tests[key](key);
obj.testMessage.innerHTML = this.counter + ') ' + mod + ' - ' + key + ': PASSED';
obj.testMessage.setAttribute('class', 'gray');

View File

@@ -76,12 +76,10 @@ Test.Modules.SHAPE = {
strokeWidth: 4,
id: 'myTriangle',
draggable: true,
shadow: {
color: 'black',
opacity: 0.5,
blur: 10,
offset: 10
}
shadowColor: 'black',
shadowOpacity: 0.5,
shadowBlur: 10,
shadowOffset: 10
});
stage.add(layer.add(triangle));

View File

@@ -228,6 +228,8 @@ Test.Modules.Text = {
layer.add(text);
stage.add(layer);
//console.log(layer.toDataURL());
warn(layer.toDataURL() === dataUrls['multiline text with shadows'], 'multi line text with shadows data url is incorrect');
},