Commit b5e65154dd9e2455a36d3a561ecbbeb483a1add9
Check box option to Show/Hide selection box from Image Anno
| | | | 177 | events: { | 177 | events: { |
---|
178 | 'click #img-url-submit': 'setImage', | 178 | 'click #img-url-submit': 'setImage', |
---|
179 | 'click #sweet': 'sweet', | 179 | 'click #sweet': 'sweet', |
---|
180 | 'click #signin-credentials': 'getSignInCredentials' | | 'click #signin-credentials': 'getSignInCredentials' |
---|
| | 180 | 'click #signin-credentials': 'getSignInCredentials', | | | 181 | 'click #setbox': 'showHide' |
---|
181 | }, | 182 | }, |
---|
182 | initialize: function() { | 183 | initialize: function() { |
---|
183 | //var allElements = $('body *'); | 184 | //var allElements = $('body *'); |
---|
… | | … | |
---|
190 | anno.hideAnnotations();}); | 190 | anno.hideAnnotations();}); |
---|
191 | anno.addHandler('onSelectionCompleted', function(annotation) { | 191 | anno.addHandler('onSelectionCompleted', function(annotation) { |
---|
192 | anno.showAnnotations(); }); | 192 | anno.showAnnotations(); }); |
---|
193 | anno.addHandler('onEditorShown', function(annotation) { | | anno.addHandler('onEditorShown', function(annotation) { |
---|
194 | anno.hideAnnotations();} ); | | anno.hideAnnotations();} ); |
---|
| | 193 | | | | 194 | |
---|
195 | this.$overlay = $('#app-overlay'); | 195 | this.$overlay = $('#app-overlay'); |
---|
196 | this.$img = $('#annotatable-img'); | 196 | this.$img = $('#annotatable-img'); |
---|
197 | this.imgURL = this.$img.attr('src'); | 197 | this.imgURL = this.$img.attr('src'); |
---|
… | | … | |
---|
203 | this.helpview.step(1); | 203 | this.helpview.step(1); |
---|
204 | } | 204 | } |
---|
205 | }, | 205 | }, |
---|
| | 206 | showHide: function() { |
---|
| | 207 | if($("input:checked").length) { |
---|
| | 208 | $('.annotorious-item-unfocus').css("opacity", "0.5"); |
---|
| | 209 | } |
---|
| | 210 | else { |
---|
| | 211 | $('.annotorious-item-unfocus').css("opacity", "0"); |
---|
| | 212 | } |
---|
| | 213 | |
---|
| | 214 | }, |
---|
| | 215 | |
---|
206 | setImage: function() { | 216 | setImage: function() { |
---|
207 | anno.reset(); | 217 | anno.reset(); |
---|
208 | this.imgURL = $('#img-url-input').val(); | 218 | this.imgURL = $('#img-url-input').val(); |
---|
| | | | 31 | </div> | 31 | </div> |
---|
32 | <button class="btn btn-default" id="img-url-submit">GO</button> | 32 | <button class="btn btn-default" id="img-url-submit">GO</button> |
---|
33 | <button class="btn btn-default" id="sweet">Sweet</button> | 33 | <button class="btn btn-default" id="sweet">Sweet</button> |
---|
| | 34 | <input id="setbox" type="checkbox" >Show/Hide Box</input> |
---|
34 | </div> | 35 | </div> |
---|
35 | <div id="img-annotation-wrapper" class="col-md-12 col-xs-12 col-lg-12 col-sm-12 well"> | 36 | <div id="img-annotation-wrapper" class="col-md-12 col-xs-12 col-lg-12 col-sm-12 well"> |
---|
36 | {% if url %} | 37 | {% if url %} |
---|