Merge branch 'master' into redraw

This commit is contained in:
Éric Lemoine
2012-01-04 09:06:29 +01:00
263 changed files with 757 additions and 564 deletions

2
.gitignore vendored
View File

@@ -1 +1,3 @@
/build/OpenLayers.js
tools/closure-compiler.jar
tools/*.pyc

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env python
import sys
import os
sys.path.append("../tools")
import mergejs
import optparse
@@ -13,7 +14,9 @@ def build(config_file = None, output_file = None, options = None):
except ImportError:
print "No jsmin"
try:
import closure
# tools/closure_library_jscompiler.py from:
# http://code.google.com/p/closure-library/source/browse/trunk/closure/bin/build/jscompiler.py
import closure_library_jscompiler as closureCompiler
have_compressor.append("closure")
except Exception, E:
print "No closure (%s)" % E
@@ -48,7 +51,11 @@ def build(config_file = None, output_file = None, options = None):
outputFilename = output_file
print "Merging libraries."
merged = mergejs.run(sourceDirectory, None, configFilename)
if use_compressor == "closure":
sourceFiles = mergejs.getNames(sourceDirectory, configFilename)
else:
merged = mergejs.run(sourceDirectory, None, configFilename)
print "Compressing using %s" % use_compressor
if use_compressor == "jsmin":
minimized = jsmin.jsmin(merged)
@@ -68,12 +75,29 @@ def build(config_file = None, output_file = None, options = None):
print "\nAbnormal termination due to compilation errors."
sys.exit("ERROR: Closure Compilation using Web service failed!")
else:
print '\nClosure Compilation using Web service has completed successfully.'
print "Closure Compilation using Web service has completed successfully."
elif use_compressor == "closure":
minimized = closure.minimize(merged)
jscompilerJar = "../tools/closure-compiler.jar"
if not os.path.isfile(jscompilerJar):
print "\nNo closure-compiler.jar; read README.txt!"
sys.exit("ERROR: Closure Compiler \"%s\" does not exist! Read README.txt" % jscompilerJar)
minimized = closureCompiler.Compile(
jscompilerJar,
sourceFiles, [
"--externs", "closure-compiler/Externs.js",
"--jscomp_warning", "checkVars", # To enable "undefinedVars"
"--jscomp_error", "checkRegExp", # Also necessary to enable "undefinedVars"
"--jscomp_error", "undefinedVars"
]
)
if minimized is None:
print "\nAbnormal termination due to compilation errors."
sys.exit("ERROR: Closure Compilation failed! See compilation errors.")
print "Closure Compilation has completed successfully."
else: # fallback
minimized = merged
print "Adding license file."
print "\nAdding license file."
minimized = file("license.txt").read() + minimized
print "Writing to %s." % outputFilename
@@ -92,4 +116,4 @@ if __name__ == '__main__':
elif len(args) == 2:
build(args[0], args[1], options=options)
else:
print "Wrong number of arguments"
print "Wrong number of arguments"

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
@@ -202,7 +202,6 @@
"OpenLayers/Control/TransformFeature.js",
"OpenLayers/Control/SLDSelect.js",
"OpenLayers/Geometry.js",
"OpenLayers/Geometry/Rectangle.js",
"OpenLayers/Geometry/Collection.js",
"OpenLayers/Geometry/Point.js",
"OpenLayers/Geometry/MultiPoint.js",

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
@@ -550,10 +550,8 @@ OpenLayers.Control.LayerSwitcher =
OpenLayers.Rico.Corner.changeOpacity(this.layersDiv, 0.75);
}
var imgLocation = OpenLayers.Util.getImagesLocation();
// maximize button div
var img = imgLocation + 'layer-switcher-maximize.png';
var img = OpenLayers.Util.getImageLocation('layer-switcher-maximize.png');
this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv(
"OpenLayers_Control_MaximizeDiv",
null,
@@ -569,7 +567,7 @@ OpenLayers.Control.LayerSwitcher =
this.div.appendChild(this.maximizeDiv);
// minimize button div
var img = imgLocation + 'layer-switcher-minimize.png';
var img = OpenLayers.Util.getImageLocation('layer-switcher-minimize.png');
this.minimizeDiv = OpenLayers.Util.createAlphaImageDiv(
"OpenLayers_Control_MinimizeDiv",
null,

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
@@ -238,9 +238,8 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
// map viewport.
if(!this.outsideViewport) {
this.div.className += " " + this.displayClass + 'Container';
var imgLocation = OpenLayers.Util.getImagesLocation();
// maximize button div
var img = imgLocation + 'layer-switcher-maximize.png';
var img = OpenLayers.Util.getImageLocation('layer-switcher-maximize.png');
this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv(
this.displayClass + 'MaximizeButton',
null,
@@ -256,7 +255,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
this.div.appendChild(this.maximizeDiv);
// minimize button div
var img = imgLocation + 'layer-switcher-minimize.png';
var img = OpenLayers.Util.getImageLocation('layer-switcher-minimize.png');
this.minimizeDiv = OpenLayers.Util.createAlphaImageDiv(
'OpenLayers_Control_minimizeDiv',
null,

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
@@ -119,7 +119,7 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, {
* image of the button, and has all the proper event handlers set.
*/
_addButton:function(id, img, xy, sz) {
var imgLocation = OpenLayers.Util.getImagesLocation() + img;
var imgLocation = OpenLayers.Util.getImageLocation(img);
var btn = OpenLayers.Util.createAlphaImageDiv(
this.id + "_" + id,
xy, sz, imgLocation, "absolute");

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
@@ -193,14 +193,13 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
* location - {<OpenLayers.Pixel>} where zoombar drawing is to start.
*/
_addZoomBar:function(centered) {
var imgLocation = OpenLayers.Util.getImagesLocation();
var imgLocation = OpenLayers.Util.getImageLocation("slider.png");
var id = this.id + "_" + this.map.id;
var zoomsToEnd = this.map.getNumZoomLevels() - 1 - this.map.getZoom();
var slider = OpenLayers.Util.createAlphaImageDiv(id,
centered.add(-1, zoomsToEnd * this.zoomStopHeight),
new OpenLayers.Size(20,9),
imgLocation+"slider.png",
imgLocation,
"absolute");
slider.style.cursor = "move";
this.slider = slider;
@@ -221,6 +220,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
var sz = new OpenLayers.Size();
sz.h = this.zoomStopHeight * this.map.getNumZoomLevels();
sz.w = this.zoomStopWidth;
var imgLocation = OpenLayers.Util.getImageLocation("zoombar.png");
var div = null;
if (OpenLayers.Util.alphaHack()) {
@@ -228,7 +228,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
div = OpenLayers.Util.createAlphaImageDiv(id, centered,
new OpenLayers.Size(sz.w,
this.zoomStopHeight),
imgLocation + "zoombar.png",
imgLocation,
"absolute", null, "crop");
div.style.height = sz.h + "px";
} else {
@@ -236,7 +236,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
'OpenLayers_Control_PanZoomBar_Zoombar' + this.map.id,
centered,
sz,
imgLocation+"zoombar.png");
imgLocation);
}
div.style.cursor = "pointer";
this.zoombarDiv = div;

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
@@ -166,6 +166,15 @@ OpenLayers.Control.TransformFeature = OpenLayers.Class(OpenLayers.Control, {
*/
dragControl: null,
/**
* APIProperty: irregular
* {Boolean} Make scaling/resizing work irregularly. If true then
* dragging a handle causes the feature to resize in the direction
* of movement. If false then the feature resizes symetrically
* about it's center.
*/
irregular: false,
/**
* Constructor: OpenLayers.Control.TransformFeature
* Create a new transform feature control.
@@ -390,6 +399,10 @@ OpenLayers.Control.TransformFeature = OpenLayers.Class(OpenLayers.Control, {
var dy1 = this.y - centerGeometry.y;
var dx0 = dx1 - (this.x - oldGeom.x);
var dy0 = dy1 - (this.y - oldGeom.y);
if (control.irregular && !control._setfeature) {
dx1 -= (this.x - oldGeom.x) / 2;
dy1 -= (this.y - oldGeom.y) / 2;
}
this.x = oldX;
this.y = oldY;
var scale, ratio = 1;
@@ -411,6 +424,13 @@ OpenLayers.Control.TransformFeature = OpenLayers.Class(OpenLayers.Control, {
control.box.geometry.resize(scale, centerGeometry, ratio);
control.box.geometry.rotate(control.rotation, centerGeometry);
control.transformFeature({scale: scale, ratio: ratio});
if (control.irregular && !control._setfeature) {
var newCenter = centerGeometry.clone();
newCenter.x += Math.abs(oldX - centerGeometry.x) < 0.00001 ? 0 : (this.x - oldX);
newCenter.y += Math.abs(oldY - centerGeometry.y) < 0.00001 ? 0 : (this.y - oldY);
control.box.geometry.move(this.x - oldX, this.y - oldY);
control.transformFeature({center: newCenter});
}
};
// Override for rotation handle move - make sure that the box and

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
@@ -7,6 +7,11 @@
* @requires OpenLayers/Rule.js
* @requires OpenLayers/Format/SLD.js
* @requires OpenLayers/Format/Filter/v1_0_0.js
* @requires OpenLayers/Symbolizer/Point.js
* @requires OpenLayers/Symbolizer/Line.js
* @requires OpenLayers/Symbolizer/Polygon.js
* @requires OpenLayers/Symbolizer/Text.js
* @requires OpenLayers/Symbolizer/Raster.js
*/
/**

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */

Some files were not shown because too many files have changed in this diff Show More