diff options
author | Valerio Virgillito | 2012-06-06 17:04:34 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-06 17:04:34 -0700 |
commit | 6442dcc0cc4088d28558a9c121c6a91cba3ff078 (patch) | |
tree | 8f2f2db6097104e44c8d87e11466d1f3124c7f3a /js/tools/TagTool.js | |
parent | 488ae8d98deb30009cb8b5b2da464fe52940050b (diff) | |
parent | 47e0e1f047e83b71c3f86812a45d33904201cc7a (diff) | |
download | ninja-6442dcc0cc4088d28558a9c121c6a91cba3ff078.tar.gz |
Merge branch 'refs/heads/master' into element-model-fixes
Conflicts:
js/tools/LineTool.js
js/tools/ShapeTool.js
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/tools/TagTool.js')
-rwxr-xr-x | js/tools/TagTool.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/js/tools/TagTool.js b/js/tools/TagTool.js index d56566cf..508e2a85 100755 --- a/js/tools/TagTool.js +++ b/js/tools/TagTool.js | |||
@@ -51,16 +51,20 @@ exports.TagTool = Montage.create(DrawingTool, { | |||
51 | 51 | ||
52 | HandleLeftButtonUp: { | 52 | HandleLeftButtonUp: { |
53 | value: function(event) { | 53 | value: function(event) { |
54 | var w, h; | ||
54 | if(this._escape) { | 55 | if(this._escape) { |
55 | this._escape = false; | 56 | this._escape = false; |
56 | return; | 57 | return; |
57 | } | 58 | } |
58 | 59 | ||
59 | if(this._hasDraw) { | 60 | if(this._hasDraw) { |
60 | var drawData = this.getDrawingData(); | 61 | this.drawData = this.getDrawingData(); |
61 | 62 | if(this.drawData) { | |
62 | if(drawData) { | 63 | w = Math.floor(this.drawData.width); |
63 | this.insertElement(drawData); | 64 | h = Math.floor(this.drawData.height); |
65 | if( (w > 0) && (h > 0) ) { | ||
66 | this.insertElement(this.drawData); | ||
67 | } | ||
64 | } | 68 | } |
65 | 69 | ||
66 | this._hasDraw = false; | 70 | this._hasDraw = false; |