Commit e0ee74c158f31baa5083128faa85bae65bf54471
1 parent
e32d6b2cb5
Exists in
master
and in
1 other branch
update fix layer process
Showing 5 changed files with 30 additions and 6 deletions Side-by-side Diff
app/index.html
app/scripts/controllers/main.js
| 1 | 1 | define(['app'], function (app) { |
| 2 | 2 | 'use strict'; |
| 3 | - app.controller('MainCtrl', function ($rootScope, $scope, $illustration, $t_shirt) { | |
| 3 | + app.controller('MainCtrl', function ($rootScope, $scope, $timeout, $illustration, $t_shirt) { | |
| 4 | 4 | $rootScope.API_URL = 'http://domain.com'; |
| 5 | 5 | $scope.designFrameView = 'views/tshirt-design.html?ver='+VERSION; |
| 6 | 6 | $scope.designPartIllustration = 'views/design_part/illustration.html?ver='+VERSION; |
| ... | ... | @@ -50,6 +50,14 @@ |
| 50 | 50 | $scope.illustrationSelectConfig = { |
| 51 | 51 | allowClear:true |
| 52 | 52 | }; |
| 53 | + $timeout(function(){ | |
| 54 | + $('.illstration-item').tooltip({ | |
| 55 | + animated: 'fade', | |
| 56 | + placement: 'bottom', | |
| 57 | + html: true | |
| 58 | + }); | |
| 59 | + console.log('here'); | |
| 60 | + },1000); | |
| 53 | 61 | break; |
| 54 | 62 | } |
| 55 | 63 | case 'text': { |
app/scripts/controllers/tshirtdesign.js
| ... | ... | @@ -89,7 +89,6 @@ |
| 89 | 89 | // if (obj === options.target) return; |
| 90 | 90 | // obj.setOpacity(options.target.intersectsWithObject(obj) ? 0.5 : 1); |
| 91 | 91 | // }); |
| 92 | - | |
| 93 | 92 | } |
| 94 | 93 | |
| 95 | 94 | function onObjectOut() { |
| ... | ... | @@ -141,7 +140,7 @@ |
| 141 | 140 | |
| 142 | 141 | function onObjectSelected(options) { |
| 143 | 142 | var currentObj = options.target; |
| 144 | - console.log(currentObj.text); | |
| 143 | + // console.log(currentObj.text); | |
| 145 | 144 | $scope.typeObject = currentObj.type; |
| 146 | 145 | switch ($scope.typeObject) { |
| 147 | 146 | case 'i-text' : |
| ... | ... | @@ -292,7 +291,7 @@ |
| 292 | 291 | activeObject.sendToBack(); |
| 293 | 292 | break; |
| 294 | 293 | } |
| 295 | - canvas.renderAll(); | |
| 294 | + canvas.deactivateAll().renderAll(); | |
| 296 | 295 | } |
| 297 | 296 | }; |
| 298 | 297 |
app/styles/main.css
| ... | ... | @@ -600,7 +600,14 @@ |
| 600 | 600 | .aside #choice-illustration li .content .illustration-list .footer-bar .footer-pagination:hover { |
| 601 | 601 | background: #999999; |
| 602 | 602 | } |
| 603 | +.tooltip-arrow, | |
| 604 | +.red-tooltip + .tooltip > .tooltip-inner { | |
| 605 | + background-color: #FFF; | |
| 606 | + margin:0; | |
| 607 | + padding:0; | |
| 608 | +} | |
| 603 | 609 | |
| 610 | +/* Insert image*/ | |
| 604 | 611 | #btn-choose-image { |
| 605 | 612 | background: #ff0f00; |
| 606 | 613 | cursor: pointer; |
| 607 | 614 | |
| ... | ... | @@ -667,8 +674,12 @@ |
| 667 | 674 | right: 5px; |
| 668 | 675 | bottom: 0; |
| 669 | 676 | } |
| 677 | +.tshirt-design-container .trash-design:hover{ | |
| 678 | + opacity: 0.5; | |
| 679 | +} | |
| 670 | 680 | |
| 671 | 681 | |
| 682 | + | |
| 672 | 683 | /*FOOTER*/ |
| 673 | 684 | footer{ |
| 674 | 685 | background-color: #333333; |
| ... | ... | @@ -698,5 +709,11 @@ |
| 698 | 709 | @media screen and (min-width: 768px) { |
| 699 | 710 | /* Remove the padding we set earlier */ |
| 700 | 711 | |
| 712 | +} | |
| 713 | + | |
| 714 | +@media (min-width: 1024px) { | |
| 715 | + #tshirt-design .modal-dialog{ | |
| 716 | + min-width: 1000px; | |
| 717 | + } | |
| 701 | 718 | } |
app/views/design_part/illustration.html
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | <option ng-repeat="(key,cate) in IllustrationList" value="{{key}}">{{cate.name}}</option> |
| 9 | 9 | </select> |
| 10 | 10 | <div class="illustration-list" ng-init="currentIllustrationPage=1;perIllustrationPage=16"> |
| 11 | - <div class="illstration-item" ng-repeat="item in currentIllustrationCate.list | limitTo:perIllustrationPage:((currentIllustrationPage-1)*perIllustrationPage)" ng-click="insertSvg(item)"> | |
| 11 | + <div class="illstration-item" ng-repeat="item in currentIllustrationCate.list | limitTo:perIllustrationPage:((currentIllustrationPage-1)*perIllustrationPage)" ng-click="insertSvg(item)" title="<img src='{{item.path}}' style='width:200px;background:#e2e2e2;margin:0;padding:0;margin-left:-8px;border:0'/>" data-toggle="tooltip"> | |
| 12 | 12 | <img ng-src="{{item.path}}"/> |
| 13 | 13 | </div> |
| 14 | 14 | <div class="clearfix"></div> |