mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
better error messages
This commit is contained in:
parent
2e40322b83
commit
c6e38c55a1
@ -5,8 +5,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## Not released:
|
||||
|
||||
## 4.1.6 - 2020-02-25
|
||||
|
||||
* Events fixes for `Konva.Transformer`
|
||||
* Now `Konva` will keep `id` in a cloned node
|
||||
* Better error messages on tainted canvas issues
|
||||
|
||||
## 4.1.5 - 2020-02-16
|
||||
|
||||
|
@ -135,7 +135,11 @@ export class Canvas {
|
||||
try {
|
||||
return this._canvas.toDataURL();
|
||||
} catch (err) {
|
||||
Util.error('Unable to get data URL. ' + err.message);
|
||||
Util.error(
|
||||
'Unable to get data URL. ' +
|
||||
err.message +
|
||||
'. For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html.'
|
||||
);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
14
src/Node.ts
14
src/Node.ts
@ -619,7 +619,7 @@ export abstract class Node<Config extends NodeConfig = NodeConfig> {
|
||||
Util.error(
|
||||
'Filter should be type of function, but got ' +
|
||||
typeof filter +
|
||||
' insted. Please check correct filters'
|
||||
' instead. Please check correct filters'
|
||||
);
|
||||
continue;
|
||||
}
|
||||
@ -627,7 +627,11 @@ export abstract class Node<Config extends NodeConfig = NodeConfig> {
|
||||
filterContext.putImageData(imageData, 0, 0);
|
||||
}
|
||||
} catch (e) {
|
||||
Util.error('Unable to apply filter. ' + e.message);
|
||||
Util.error(
|
||||
'Unable to apply filter. ' +
|
||||
e.message +
|
||||
'. This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.'
|
||||
);
|
||||
}
|
||||
|
||||
this._filterUpToDate = true;
|
||||
@ -2233,9 +2237,9 @@ export abstract class Node<Config extends NodeConfig = NodeConfig> {
|
||||
var stopBubble =
|
||||
(eventType === MOUSEENTER || eventType === MOUSELEAVE) &&
|
||||
compareShape &&
|
||||
compareShape.isAncestorOf &&
|
||||
compareShape.isAncestorOf(this) &&
|
||||
!compareShape.isAncestorOf(this.parent);
|
||||
compareShape.isAncestorOf &&
|
||||
compareShape.isAncestorOf(this) &&
|
||||
!compareShape.isAncestorOf(this.parent);
|
||||
if (
|
||||
((evt && !evt.cancelBubble) || !evt) &&
|
||||
this.parent &&
|
||||
|
Loading…
Reference in New Issue
Block a user