Changeset 6067
- Timestamp:
- 02/07/08 22:27:15 (1 year ago)
- Files:
-
- sandbox/crschmidt/animated_panning/doc/authors.txt (modified) (2 diffs)
- sandbox/crschmidt/animated_panning/examples/click-handler.html (modified) (3 diffs)
- sandbox/crschmidt/animated_panning/lib/OpenLayers/Control/OverviewMap.js (modified) (1 diff)
- sandbox/crschmidt/animated_panning/lib/OpenLayers/Format/WFS.js (modified) (7 diffs)
- sandbox/crschmidt/animated_panning/lib/OpenLayers/Format/WMC/v1_1_0.js (modified) (1 diff)
- sandbox/crschmidt/animated_panning/lib/OpenLayers/Handler/Click.js (modified) (2 diffs)
- sandbox/crschmidt/animated_panning/lib/OpenLayers/Popup.js (modified) (3 diffs)
- sandbox/crschmidt/animated_panning/tests/Format/WMC (copied) (copied from trunk/openlayers/tests/Format/WMC)
- sandbox/crschmidt/animated_panning/tests/Format/WMC/test_v1_1_0.html (copied) (copied from trunk/openlayers/tests/Format/WMC/test_v1_1_0.html)
- sandbox/crschmidt/animated_panning/tests/Handler/test_Click.html (modified) (2 diffs)
- sandbox/crschmidt/animated_panning/tests/list-tests.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/crschmidt/animated_panning/doc/authors.txt
r6032 r6067 1 1 OpenLayers contributors: 2 2 3 Seb Benthall 3 4 Howard Butler 4 5 Bertil Chaupis … … 25 26 James Stembridge 26 27 Erik Uzureau 28 Ivan Willig 27 29 Bill Woodall 28 30 Steve Woodbridge sandbox/crschmidt/animated_panning/examples/click-handler.html
r5438 r6067 39 39 'single': true, 40 40 'double': false, 41 'pixelTolerance': null,41 'pixelTolerance': 0, 42 42 'stopSingle': false, 43 43 'stopDouble': false … … 103 103 } 104 104 }), 105 " nodrag": new OpenLayers.Control.Click({105 "drag": new OpenLayers.Control.Click({ 106 106 handlerOptions: { 107 107 "single": true, 108 "pixelTolerance": 1108 "pixelTolerance": null 109 109 } 110 110 }), … … 205 205 </tr> 206 206 <tr> 207 <td>single nodrag</td>208 <td><button id=" nodragStatus" onclick="toggle('nodrag')">off</button></td>209 <td><textarea class="output" id=" nodragOutput"></textarea></td>207 <td>single with drag</td> 208 <td><button id="dragStatus" onclick="toggle('drag')">off</button></td> 209 <td><textarea class="output" id="dragOutput"></textarea></td> 210 210 </tr> 211 211 <tr> sandbox/crschmidt/animated_panning/lib/OpenLayers/Control/OverviewMap.js
r6045 r6067 435 435 // create the overview map 436 436 var options = OpenLayers.Util.extend( 437 {controls: [], maxResolution: 'auto', 'fallThrough': false}, this.mapOptions); 437 {controls: [], maxResolution: 'auto', 438 fallThrough: false}, this.mapOptions); 438 439 this.ovmap = new OpenLayers.Map(this.mapDiv, options); 439 440 sandbox/crschmidt/animated_panning/lib/OpenLayers/Format/WFS.js
r5868 r6067 22 22 */ 23 23 wfsns: "http://www.opengis.net/wfs", 24 25 ogcns: "http://www.opengis.net/ogc", 24 26 25 27 /* … … 58 60 */ 59 61 write: function(features) { 60 61 var transaction = this.createElementNS( 'http://www.opengis.net/wfs', 'wfs:Transaction');62 63 var transaction = this.createElementNS(this.wfsns, 'wfs:Transaction'); 62 64 transaction.setAttribute("version","1.0.0"); 63 65 transaction.setAttribute("service","WFS"); … … 75 77 } 76 78 } 77 return transaction; 79 80 return OpenLayers.Format.XML.prototype.write.apply(this,[transaction]); 78 81 }, 79 82 … … 91 94 featureContainer.appendChild(geomContainer); 92 95 for(var attr in feature.attributes) { 93 var attrText = document.createTextNode(feature.attributes[attr]);96 var attrText = this.createTextNode(feature.attributes[attr]); 94 97 var nodename = attr; 95 98 if (attr.search(":") != -1) { … … 129 132 130 133 var propertyNode = this.createElementNS(this.wfsns, 'wfs:Property'); 131 var nameNode = this.createElementNS( 'http://www.opengis.net/wfs', 'wfs:Name');134 var nameNode = this.createElementNS(this.wfsns, 'wfs:Name'); 132 135 133 var txtNode = document.createTextNode(this.geometryName);136 var txtNode = this.createTextNode(this.geometryName); 134 137 nameNode.appendChild(txtNode); 135 138 propertyNode.appendChild(nameNode); 136 139 137 var valueNode = this.createElementNS( 'http://www.opengis.net/wfs', 'wfs:Value');140 var valueNode = this.createElementNS(this.wfsns, 'wfs:Value'); 138 141 valueNode.appendChild(this.buildGeometryNode(feature.geometry)); 139 142 … … 141 144 updateNode.appendChild(propertyNode); 142 145 143 var filterNode = this.createElementNS( 'http://www.opengis.net/ogc', 'ogc:Filter');144 var filterIdNode = this.createElementNS( 'http://www.opengis.net/ogc', 'ogc:FeatureId');146 var filterNode = this.createElementNS(this.ogcns, 'ogc:Filter'); 147 var filterIdNode = this.createElementNS(this.ogcns, 'ogc:FeatureId'); 145 148 filterIdNode.setAttribute("fid", feature.fid); 146 149 filterNode.appendChild(filterIdNode); … … 165 168 deleteNode.setAttribute("typeName", this.layerName); 166 169 167 var filterNode = this.createElementNS( 'http://www.opengis.net/ogc', 'ogc:Filter');168 var filterIdNode = this.createElementNS( 'http://www.opengis.net/ogc', 'ogc:FeatureId');170 var filterNode = this.createElementNS(this.ogcns, 'ogc:Filter'); 171 var filterIdNode = this.createElementNS(this.ogcns, 'ogc:FeatureId'); 169 172 filterIdNode.setAttribute("fid", feature.fid); 170 173 filterNode.appendChild(filterIdNode); sandbox/crschmidt/animated_panning/lib/OpenLayers/Format/WMC/v1_1_0.js
r5919 r6067 90 90 91 91 // min/max scale denominator elements go before the 4th element in v1 92 var minSD = this.createElementNS( 93 this.namespaces.sld, "sld:MinScaleDenominator" 94 ); 95 minSD.appendChild(this.createTextNode(layer.maxScale.toPrecision(10))); 96 node.insertBefore(minSD, node.childNodes[3]); 92 if(layer.options.resolutions || layer.options.scales || 93 layer.options.minResolution || layer.options.maxScale) { 94 var minSD = this.createElementNS( 95 this.namespaces.sld, "sld:MinScaleDenominator" 96 ); 97 minSD.appendChild(this.createTextNode(layer.maxScale.toPrecision(10))); 98 node.insertBefore(minSD, node.childNodes[3]); 99 } 97 100 98 var maxSD = this.createElementNS( 99 this.namespaces.sld, "sld:MaxScaleDenominator" 100 ); 101 maxSD.appendChild(this.createTextNode(layer.minScale.toPrecision(10))); 102 node.insertBefore(maxSD, node.childNodes[4]); 101 if(layer.options.resolutions || layer.options.scales || 102 layer.options.maxResolution || layer.options.minScale) { 103 var maxSD = this.createElementNS( 104 this.namespaces.sld, "sld:MaxScaleDenominator" 105 ); 106 maxSD.appendChild(this.createTextNode(layer.minScale.toPrecision(10))); 107 node.insertBefore(maxSD, node.childNodes[4]); 108 } 103 109 104 110 return node; sandbox/crschmidt/animated_panning/lib/OpenLayers/Handler/Click.js
r5698 r6067 46 46 * APIProperty: pixelTolerance 47 47 * {Number} Maximum number of pixels between mouseup and mousedown for an 48 * event to be considered a click. Default is null. If set to an48 * event to be considered a click. Default is 0. If set to an 49 49 * integer value, clicks with a drag greater than the value will be 50 50 * ignored. This property can only be set when the handler is 51 51 * constructed. 52 52 */ 53 pixelTolerance: null,53 pixelTolerance: 0, 54 54 55 55 /** … … 183 183 passesTolerance: function(evt) { 184 184 var passes = true; 185 if(this.pixelTolerance && this.down) {185 if(this.pixelTolerance != null && this.down) { 186 186 var dpx = Math.sqrt( 187 187 Math.pow(this.down.x - evt.xy.x, 2) + sandbox/crschmidt/animated_panning/lib/OpenLayers/Popup.js
r5614 r6067 92 92 93 93 /** 94 * Property: closeDiv 95 * {DOMElement} the optional closer image 96 */ 97 closeDiv: null, 98 99 /** 94 100 * Property: padding 95 101 * {int} the internal padding of the content div. … … 158 164 var closeSize = new OpenLayers.Size(17,17); 159 165 var img = OpenLayers.Util.getImagesLocation() + "close.gif"; 160 var closeImg = OpenLayers.Util.createAlphaImageDiv(this.id + "_close", 161 null, 162 closeSize, 163 img); 164 closeImg.style.right = this.padding + "px"; 165 closeImg.style.top = this.padding + "px"; 166 this.groupDiv.appendChild(closeImg); 166 this.closeDiv = OpenLayers.Util.createAlphaImageDiv( 167 this.id + "_close", null, closeSize, img 168 ); 169 this.closeDiv.style.right = this.padding + "px"; 170 this.closeDiv.style.top = this.padding + "px"; 171 this.groupDiv.appendChild(this.closeDiv); 167 172 168 173 var closePopup = closeBoxCallback || function(e) { … … 170 175 OpenLayers.Event.stop(e); 171 176 }; 172 OpenLayers.Event.observe( closeImg, "click",177 OpenLayers.Event.observe(this.closeDiv, "click", 173 178 OpenLayers.Function.bindAsEventListener(closePopup, this)); 174 179 sandbox/crschmidt/animated_panning/tests/Handler/test_Click.html
r5685 r6067 44 44 45 45 function test_Handler_Click_events(t) { 46 t.plan(3 0);46 t.plan(35); 47 47 48 48 var map = new OpenLayers.Map('map'); … … 73 73 // list below events that should be handled (events) and those 74 74 // that should not be handled (nonevents) by the handler 75 var events = ["click", "dblclick" ];76 var nonevents = ["mouse down", "mousemove", "mouseup", "resize", "focus", "blur"];75 var events = ["click", "dblclick", "mousedown"]; 76 var nonevents = ["mousemove", "mouseup", "resize", "focus", "blur"]; 77 77 var handler = new OpenLayers.Handler.Click(control); 78 78 // set browser event like properties on the handler sandbox/crschmidt/animated_panning/tests/list-tests.html
r6032 r6067 32 32 <li>Format/test_WKT.html</li> 33 33 <li>Format/test_WMC.html</li> 34 <li>Format/WMC/test_v1_1_0.html</li> 34 35 <li>Format/test_XML.html</li> 35 36 <li>test_Icon.html</li>
