Browse Source

Protect ShapePath against the closure circular reference bug

Tristan VALCKE 8 years ago
parent
commit
831404b77f
1 changed files with 7 additions and 7 deletions
  1. 7 7
      src/extras/core/ShapePath.js

+ 7 - 7
src/extras/core/ShapePath.js

@@ -1,12 +1,11 @@
-/**
- * @author zz85 / http://www.lab4games.net/zz85/blog
- * minimal class for proxing functions to Path. Replaces old "extractSubpaths()"
- **/
-
 import { Path } from './Path';
 import { Shape } from './Shape';
 import { ShapeUtils } from '../ShapeUtils';
 
+/**
+ * @author zz85 / http://www.lab4games.net/zz85/blog
+ * minimal class for proxing functions to Path. Replaces old "extractSubpaths()"
+ **/
 
 function ShapePath() {
 
@@ -15,7 +14,7 @@ function ShapePath() {
 
 }
 
-ShapePath.prototype = {
+Object.assign( ShapePath.prototype, {
 
 	moveTo: function ( x, y ) {
 
@@ -276,6 +275,7 @@ ShapePath.prototype = {
 
 	}
 
-};
+} );
+
 
 export { ShapePath };