Commit e872619e5e6236bd496e73b9c64ee95b7b8cde20
1 parent
83f7186e9d
Exists in
master
and in
1 other branch
delete comment
Showing 6 changed files with 14 additions and 44 deletions Side-by-side Diff
app/scripts/app.js
... | ... | @@ -22,13 +22,6 @@ |
22 | 22 | app.filter = $filterProvider.register; |
23 | 23 | app.factory = $provide.factory; |
24 | 24 | app.service = $provide.service; |
25 | - | |
26 | - // enable below line for enable html5 mode | |
27 | - // $locationProvider.html5Mode({ | |
28 | - // enabled: true, | |
29 | - // requireBase: false | |
30 | - // }); | |
31 | - | |
32 | 25 | /* resolve controller function for lazyload */ |
33 | 26 | var resolveController = function (dependencies){ |
34 | 27 | return { |
35 | 28 | |
... | ... | @@ -54,7 +47,9 @@ |
54 | 47 | if (configRoutes.defaultRoutePaths !== undefined){ |
55 | 48 | $routeProvider.otherwise({redirectTo: configRoutes.defaultRoutePaths}); |
56 | 49 | } |
50 | + | |
57 | 51 | } |
52 | + // | |
58 | 53 | ]); |
59 | 54 | return app; |
60 | 55 | }); |
app/scripts/controllers/about.js
app/scripts/controllers/tshirtdesign.js
... | ... | @@ -22,16 +22,10 @@ |
22 | 22 | setSizeCanvas(); |
23 | 23 | }); |
24 | 24 | |
25 | - | |
26 | 25 | //Custom control |
27 | 26 | fabric.Object.prototype.transparentCorners = true; |
28 | 27 | fabric.Object.prototype.hasRotatingPoint = false; |
29 | - // fabric.Object.prototype.selectable = false; | |
30 | 28 | |
31 | - // fabric.Canvas.prototype.__onMouseDown = function (e) { | |
32 | - // // return false; | |
33 | - // }; | |
34 | - | |
35 | 29 | var ctrVisible = {tl: false, ml:false, bl:false, mb: false, br: true, mr: false, tr: true, mt: true, mtr: false}; |
36 | 30 | for(key in ctrVisible) { |
37 | 31 | fabric.Object.prototype.setControlVisible(key,ctrVisible[key]); |
... | ... | @@ -78,9 +72,6 @@ |
78 | 72 | } |
79 | 73 | }); |
80 | 74 | |
81 | - canvas.on('after:render', function() { | |
82 | - // console.log('after render'); | |
83 | - }); | |
84 | 75 | canvas.on({ |
85 | 76 | 'object:added' : onIllustrationAdded, |
86 | 77 | 'object:moving' : onIllustrationMoving, |
... | ... | @@ -101,7 +92,6 @@ |
101 | 92 | var spacingNum = 0; |
102 | 93 | $scope.itemFont = 0; |
103 | 94 | |
104 | - | |
105 | 95 | $scope.showDesignTab = function(tab){ |
106 | 96 | canvas.deactivateAll().renderAll(); |
107 | 97 | $rootScope.isShowLeftPanel = tab; |
... | ... | @@ -118,7 +108,6 @@ |
118 | 108 | placement: 'bottom', |
119 | 109 | html: true |
120 | 110 | }); |
121 | - // console.log('here'); | |
122 | 111 | },1000); |
123 | 112 | break; |
124 | 113 | } |
... | ... | @@ -132,7 +121,6 @@ |
132 | 121 | |
133 | 122 | function onIllustrationAdded(options){ |
134 | 123 | var object = options.target; |
135 | - // console.log('object:added'); | |
136 | 124 | |
137 | 125 | if (actionObj === true) { |
138 | 126 | stateObj = [stateObj[indexCurr2]]; |
... | ... | @@ -176,7 +164,6 @@ |
176 | 164 | } |
177 | 165 | |
178 | 166 | var object = options.target; |
179 | - // console.log('object:modified'); | |
180 | 167 | if (actionObj === true) { |
181 | 168 | stateObj = [stateObj[indexCurr2]]; |
182 | 169 | listObj = [listObj[indexCurr2]]; |
... | ... | @@ -196,11 +183,7 @@ |
196 | 183 | } |
197 | 184 | |
198 | 185 | function onIllustrationChange(options) { |
199 | - // options.target.setCoords(); | |
200 | - // canvas.forEachObject(function(obj) { | |
201 | - // if (obj === options.target) return; | |
202 | - // obj.setOpacity(options.target.intersectsWithObject(obj) ? 0.5 : 1); | |
203 | - // }); | |
186 | + | |
204 | 187 | } |
205 | 188 | |
206 | 189 | function onIllustrationMoving(options) { |
... | ... | @@ -286,7 +269,6 @@ |
286 | 269 | function onObjectSelected(options) { |
287 | 270 | var currentObj = options.target; |
288 | 271 | |
289 | - | |
290 | 272 | $scope.typeObject = currentObj.type; |
291 | 273 | switch ($scope.typeObject) { |
292 | 274 | case 'i-text' : |
293 | 275 | |
... | ... | @@ -316,13 +298,11 @@ |
316 | 298 | // Illustration process |
317 | 299 | $scope.changeIllustrationCategory = function(currentIllustration){ |
318 | 300 | $scope.currentIllustrationCate = $illustration.getList(currentIllustration); |
319 | - //console.log($scope.currentIllustrationCate); | |
320 | 301 | }; |
321 | 302 | |
322 | 303 | $scope.insertSvg = function(item){ |
323 | 304 | fabric.loadSVGFromURL(item.path, function(objects, options) { |
324 | 305 | var shape = fabric.util.groupSVGElements(objects, options); |
325 | - //shape.setFill('green'); | |
326 | 306 | canvas.add(shape.scale(0.6)); |
327 | 307 | shape.set({ left: 150, top: 200 }).setCoords(); |
328 | 308 | canvas.renderAll(); |
... | ... | @@ -352,10 +332,6 @@ |
352 | 332 | obj.fill = color; |
353 | 333 | } |
354 | 334 | canvas.renderAll(); |
355 | - // if (canvas.getActiveObject()){ | |
356 | - // canvas.getActiveObject().set("fill", color); | |
357 | - // canvas.renderAll(); | |
358 | - // } | |
359 | 335 | }; |
360 | 336 | |
361 | 337 | //Font |
362 | 338 | |
363 | 339 | |
364 | 340 | |
... | ... | @@ -435,19 +411,15 @@ |
435 | 411 | if (activeObject){ |
436 | 412 | switch (mode) { |
437 | 413 | case 1: |
438 | - // canvas.bringForward(activeObject); | |
439 | 414 | activeObject.bringForward(); |
440 | 415 | break; |
441 | 416 | case 2: |
442 | - // canvas.sendBackwards(activeObject); | |
443 | 417 | activeObject.sendBackwards(); |
444 | 418 | break; |
445 | 419 | case 3: |
446 | - // canvas.bringToFront(activeObject); | |
447 | 420 | activeObject.bringToFront(); |
448 | 421 | break; |
449 | 422 | case 4: |
450 | - // canvas.sendToBack(activeObject); | |
451 | 423 | activeObject.sendToBack(); |
452 | 424 | break; |
453 | 425 | } |
app/scripts/main.js
... | ... | @@ -2,8 +2,8 @@ |
2 | 2 | require.config({ |
3 | 3 | waitSeconds: 0, |
4 | 4 | paths: { |
5 | - 'angular' : '../bower_components/angular/angular', | |
6 | - 'angular-mocks': '../bower_components/angular-mocks/angular-mocks', | |
5 | + 'angular' : '../bower_components/angular/angular', | |
6 | + 'angular-mocks': '../bower_components/angular-mocks/angular-mocks', | |
7 | 7 | 'angular-route': '../bower_components/angular-route/angular-route', |
8 | 8 | 'angular-cookies': '../bower_components/angular-cookies/angular-cookies', |
9 | 9 | 'select2': '../bower_components/select2/select2', |
app/scripts/routes.js
app/views/about.html