Ticket #1378: allowSelection.2.patch
| File allowSelection.2.patch, 4.2 kB (added by crschmidt, 9 months ago) |
|---|
-
theme/default/style.css
old new 240 240 background: url("../../img/close.gif") no-repeat; 241 241 cursor: pointer; 242 242 } 243 244 .olControlNoSelect { 245 -moz-user-select: none; 246 } -
lib/OpenLayers/Control.js
old new 79 79 type: null, 80 80 81 81 /** 82 * Property: allowSelection 83 * {Boolean} By deafault, controls do not allow selection, because 84 * it may interfere with map dragging. If this is true, OpenLayers 85 * will not prevent selection of the control. 86 * Default is false. 87 */ 88 allowSelection: false, 89 90 /** 82 91 * Property: displayClass 83 92 * {string} This property is used for CSS related to the drawing of the 84 93 * Control. … … 240 249 if (this.div == null) { 241 250 this.div = OpenLayers.Util.createDiv(this.id); 242 251 this.div.className = this.displayClass; 252 if (!this.allowSelection) { 253 this.div.className += " olControlNoSelect"; 254 this.div.setAttribute("unselectable", "on", 0); 255 this.div.onselectstart = function() { return(false); }; 256 } 243 257 if (this.title != "") { 244 258 this.div.title = this.title; 245 259 } -
lib/OpenLayers/Control/OverviewMap.js
old new 204 204 // Optionally add min/max buttons if the control will go in the 205 205 // map viewport. 206 206 if(!this.outsideViewport) { 207 this.div.className =this.displayClass + 'Container';207 this.div.className += " " + this.displayClass + 'Container'; 208 208 var imgLocation = OpenLayers.Util.getImagesLocation(); 209 209 // maximize button div 210 210 var img = imgLocation + 'layer-switcher-maximize.png'; -
lib/OpenLayers/Control/MousePosition.js
old new 91 91 if (!this.element) { 92 92 this.div.left = ""; 93 93 this.div.top = ""; 94 this.div.className = this.displayClass;95 94 this.element = this.div; 96 95 } 97 96 -
lib/OpenLayers/Control/Permalink.js
old new 109 109 OpenLayers.Control.prototype.draw.apply(this, arguments); 110 110 111 111 if (!this.element) { 112 this.div.className = this.displayClass;113 112 this.element = document.createElement("a"); 114 113 this.element.innerHTML = OpenLayers.i18n("permalink"); 115 114 this.element.href=""; -
lib/OpenLayers/Control/Scale.js
old new 43 43 OpenLayers.Control.prototype.draw.apply(this, arguments); 44 44 if (!this.element) { 45 45 this.element = document.createElement("div"); 46 this.div.className = this.displayClass;47 46 this.div.appendChild(this.element); 48 47 } 49 48 this.map.events.register( 'moveend', this, this.updateScale); -
lib/OpenLayers/Control/ScaleLine.js
old new 81 81 draw: function() { 82 82 OpenLayers.Control.prototype.draw.apply(this, arguments); 83 83 if (!this.eTop) { 84 this.div.className = this.displayClass;85 84 this.div.style.display = "block"; 86 85 this.div.style.position = "absolute"; 87 86
