mirror of
https://github.com/konvajs/konva.git
synced 2026-01-18 19:51:21 +08:00
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:
File diff suppressed because one or more lines are too long
@@ -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');
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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');
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user