Преглед изворни кода

Protect ShapePath against the closure circular reference bug

Tristan VALCKE пре 8 година
родитељ
комит
831404b77f
1 измењених фајлова са 7 додато и 7 уклоњено
  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 { Path } from './Path';
 import { Shape } from './Shape';
 import { Shape } from './Shape';
 import { ShapeUtils } from '../ShapeUtils';
 import { ShapeUtils } from '../ShapeUtils';
 
 
+/**
+ * @author zz85 / http://www.lab4games.net/zz85/blog
+ * minimal class for proxing functions to Path. Replaces old "extractSubpaths()"
+ **/
 
 
 function ShapePath() {
 function ShapePath() {
 
 
@@ -15,7 +14,7 @@ function ShapePath() {
 
 
 }
 }
 
 
-ShapePath.prototype = {
+Object.assign( ShapePath.prototype, {
 
 
 	moveTo: function ( x, y ) {
 	moveTo: function ( x, y ) {
 
 
@@ -276,6 +275,7 @@ ShapePath.prototype = {
 
 
 	}
 	}
 
 
-};
+} );
+
 
 
 export { ShapePath };
 export { ShapePath };