Commit b196bab487b2abaaeec566683a44b0c6712e4df6
1 parent
057ad34c67
Exists in
master
and in
1 other branch
fix clear color SVG.
Showing 2 changed files with 3 additions and 3 deletions Side-by-side Diff
app/index.html
app/scripts/controllers/tshirtdesign.js
... | ... | @@ -311,7 +311,7 @@ |
311 | 311 | |
312 | 312 | function onObjectSelected(options) { |
313 | 313 | var currentObj = options.target; |
314 | - if (typeof currentObj.toOrd() != 'number'){ | |
314 | + if (typeof currentObj.toOrd != 'function'){ | |
315 | 315 | var currentObjOrd = ++ObjectOrd; |
316 | 316 | currentObj.toOrd = function(){ |
317 | 317 | return currentObjOrd; |
... | ... | @@ -378,7 +378,7 @@ |
378 | 378 | if (!color){ |
379 | 379 | color = 'none'; |
380 | 380 | // console.log(obj.toOrd(), arrSvgOriginal[obj.toOrd()]); |
381 | - if (typeof obj.toOrd() == 'number' && typeof arrSvgOriginal[obj.toOrd()] != 'undefined'){ | |
381 | + if (typeof obj.toOrd == 'function' && typeof arrSvgOriginal[obj.toOrd()] != 'undefined'){ | |
382 | 382 | var currentObjOrd = obj.toOrd(); |
383 | 383 | fabric.loadSVGFromURL(arrSvgOriginal[obj.toOrd()], function(objects, options) { |
384 | 384 | var shape = fabric.util.groupSVGElements(objects, options); |