mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-20 19:31:52 +00:00
When cloning canvas (in toDataURL, for example) make sure to clone clipTo (clipping function) property as well.
This commit is contained in:
parent
dcaee8bf0c
commit
1d9247ab3a
4 changed files with 7 additions and 5 deletions
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Demos</title>
|
||||
<title>Fabric.js demos</title>
|
||||
<link rel="stylesheet" href="../lib/master.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -13,8 +13,8 @@
|
|||
</ul>
|
||||
<div id="bd-wrapper">
|
||||
<ul>
|
||||
<li style="margin-bottom:5px"><a href="ladybug/index.html">Ladybugs</a></li>
|
||||
<li style="margin-bottom:5px"><a href="cross/index.html">Crosses</a></li>
|
||||
<li style="margin-bottom:5px"><a href="ladybug/index.html">Sliding ladybugs</a></li>
|
||||
<li style="margin-bottom:5px"><a href="cross/index.html">Animating crosses (custom class)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
3
dist/all.js
vendored
3
dist/all.js
vendored
|
|
@ -6011,7 +6011,8 @@ fabric.util.animate = animate;
|
|||
el.height = this.getHeight();
|
||||
|
||||
var clone = this.__clone || (this.__clone = new fabric.Element(el));
|
||||
|
||||
clone.clipTo = this.clipTo;
|
||||
|
||||
return clone.loadFromJSON(JSON.stringify(this.toJSON()), function () {
|
||||
if (callback) {
|
||||
callback(clone);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*! Fabric.js Copyright 2008-2011, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "0.2.6" };
|
||||
var fabric = fabric || { version: "0.2.7" };
|
||||
|
||||
/**
|
||||
* Wrapper around `console.log` (when available)
|
||||
|
|
|
|||
|
|
@ -2217,6 +2217,7 @@
|
|||
|
||||
// cache
|
||||
var clone = this.__clone || (this.__clone = new fabric.Element(el));
|
||||
clone.clipTo = this.clipTo;
|
||||
|
||||
return clone.loadFromJSON(JSON.stringify(this.toJSON()), function () {
|
||||
if (callback) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue