Compare commits
8 Commits
release-2.
...
release-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8778b746b3 | ||
|
|
a5ea8d7fcf | ||
|
|
b103d3b428 | ||
|
|
8562582dd2 | ||
|
|
cd5ae45273 | ||
|
|
d1b00824fc | ||
|
|
4399ebcb04 | ||
|
|
0bb804c9e7 |
@@ -425,4 +425,4 @@
|
||||
* When asking questions or reporting issues, make sure to include the output of
|
||||
* OpenLayers.VERSION_NUMBER in the question or issue-description.
|
||||
*/
|
||||
OpenLayers.VERSION_NUMBER="Release 2.13-rc3";
|
||||
OpenLayers.VERSION_NUMBER="Release 2.13-rc4";
|
||||
|
||||
@@ -235,8 +235,8 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
this.handlers.drag.evt);
|
||||
if (feature) {
|
||||
this.dragStart(feature);
|
||||
} else if (this.feature && this.clickout) {
|
||||
this.unselectFeature(this.feature);
|
||||
} else if (this.clickout) {
|
||||
this._unselect = this.feature;
|
||||
}
|
||||
},
|
||||
move: function(pixel) {
|
||||
@@ -363,8 +363,9 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
* feature - {<OpenLayers.Feature.Vector>} the selected feature.
|
||||
*/
|
||||
selectFeature: function(feature) {
|
||||
if (this.geometryTypes && OpenLayers.Util.indexOf(this.geometryTypes,
|
||||
feature.geometry.CLASS_NAME) == -1) {
|
||||
if (this.feature === feature ||
|
||||
(this.geometryTypes && OpenLayers.Util.indexOf(this.geometryTypes,
|
||||
feature.geometry.CLASS_NAME) == -1)) {
|
||||
return;
|
||||
}
|
||||
if (this.beforeSelectFeature(feature) !== false) {
|
||||
|
||||
@@ -102,8 +102,9 @@ OpenLayers.Format.EncodedPolyline = OpenLayers.Class(OpenLayers.Format, {
|
||||
* {Array(Array(int))} An array containing n-dimensional arrays of
|
||||
* coordinates.
|
||||
*/
|
||||
decode: function(encoded, dims) {
|
||||
var flatPoints = this.decodeDeltas(encoded, dims, 1);
|
||||
decode: function(encoded, dims, opt_factor) {
|
||||
var factor = opt_factor || 1e5;
|
||||
var flatPoints = this.decodeDeltas(encoded, dims, factor);
|
||||
var flatPointsLength = flatPoints.length;
|
||||
|
||||
var points = [];
|
||||
@@ -177,7 +178,8 @@ OpenLayers.Format.EncodedPolyline = OpenLayers.Class(OpenLayers.Format, {
|
||||
* Returns:
|
||||
* {String} An encoded string
|
||||
*/
|
||||
encode: function (points, dims) {
|
||||
encode: function (points, dims, opt_factor) {
|
||||
var factor = opt_factor || 1e5;
|
||||
var flatPoints = [];
|
||||
|
||||
var pointsLength = points.length;
|
||||
@@ -189,7 +191,7 @@ OpenLayers.Format.EncodedPolyline = OpenLayers.Class(OpenLayers.Format, {
|
||||
}
|
||||
}
|
||||
|
||||
return this.encodeDeltas(flatPoints, dims, 1);
|
||||
return this.encodeDeltas(flatPoints, dims, factor);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,7 @@ var OpenLayers = {
|
||||
/**
|
||||
* Constant: VERSION_NUMBER
|
||||
*/
|
||||
VERSION_NUMBER: "Release 2.13-rc3",
|
||||
VERSION_NUMBER: "Release 2.13-rc4",
|
||||
|
||||
/**
|
||||
* Constant: singleFile
|
||||
|
||||
@@ -388,6 +388,11 @@ OpenLayers.TileManager = OpenLayers.Class({
|
||||
if (img && (!img.parentNode ||
|
||||
OpenLayers.Element.hasClass(img.parentNode, 'olBackBuffer'))) {
|
||||
if (tile.layer.backBuffer) {
|
||||
if (tile.layer.backBuffer === img.parentNode) {
|
||||
// cached image is on the target layer's backbuffer already,
|
||||
// so nothing to do here
|
||||
return;
|
||||
}
|
||||
img.style.opacity = 0;
|
||||
img.style.visibility = 'hidden';
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ The `enableKinetic` property for the DragPan control has been changed to true by
|
||||
## Control.ModifyFeature: no more built-in SelectFeature control
|
||||
|
||||
The ModifyFeature control is now much leaner, making it more reliable when combined with other controls. The most noticable change is that it has no
|
||||
`selectControl` member any more. Users who previously relied on this built-in SelectFeature control will now have to create both a SelectFeature and a ModifyFeature control and configure the ModifyFeature control with `standalone: true`. To get features selected, call the `selectFeature` method e.g. from a `featureselected` listener on the vector layer.
|
||||
`selectControl` member any more. Users who previously relied on this built-in SelectFeature control will now have to create both a SelectFeature and a ModifyFeature control and configure the ModifyFeature control with `standalone: true`. To get features selected, call the `selectFeature` method e.g. from a `featureselected` listener on the vector layer. Note that other than in the old implementation, calling `selectFeature` on an already selected feature will not do anything.
|
||||
|
||||
## Format.GPX: No more prefixes
|
||||
|
||||
|
||||
@@ -225,6 +225,7 @@
|
||||
|
||||
// Points don't call collectVertices
|
||||
control.selectFeature(fakeFeature);
|
||||
control.unselectFeature(fakeFeature);
|
||||
|
||||
control.collectVertices = function() {
|
||||
t.ok(true, "collectVertices called");
|
||||
@@ -237,7 +238,8 @@
|
||||
layer.addFeatures = function(features) {
|
||||
t.ok(features == 'a' || features == 'd', "features passed correctly");
|
||||
}
|
||||
|
||||
layer.destroyFeatures = function() {};
|
||||
|
||||
fakeFeature.geometry = new OpenLayers.Geometry.Polygon([
|
||||
new OpenLayers.Geometry.LinearRing([
|
||||
new OpenLayers.Geometry.Point(0, 0),
|
||||
@@ -246,7 +248,9 @@
|
||||
]);
|
||||
|
||||
// OnSelect calls collectVertices and passes features to layer
|
||||
control.selectFeature(fakeFeature);
|
||||
control.selectFeature(fakeFeature);
|
||||
control.unselectFeature(fakeFeature);
|
||||
layer.destroyFeatures = OpenLayers.Layer.Vector.prototype.destroyFeatures;
|
||||
|
||||
control.vertices = ['a'];
|
||||
control.virtualVertices = [{destroy: function() {}}];
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
<script src="../OLLoader.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var flatPoints;
|
||||
var floats, smallFloats, encodedFloats;
|
||||
var signedIntegers, encodedSignedIntegers;
|
||||
var unsignedIntegers, encodedUnsignedIntegers;
|
||||
var flatPoints;
|
||||
var floats, smallFloats, encodedFloats;
|
||||
var signedIntegers, encodedSignedIntegers;
|
||||
var unsignedIntegers, encodedUnsignedIntegers;
|
||||
|
||||
function resetTestingData() {
|
||||
function resetTestingData() {
|
||||
flatPoints = [38.50000, -120.20000,
|
||||
40.70000, -120.95000,
|
||||
43.25200, -126.45300];
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
unsignedIntegers = [0, 30, 1, 31, 32, 2, 174];
|
||||
encodedUnsignedIntegers = '?]@^_@AmD';
|
||||
}
|
||||
}
|
||||
|
||||
var basePoints = new Array(
|
||||
new Array(3850000, -12020000),
|
||||
@@ -106,8 +106,8 @@
|
||||
for (i in decodedPoints) {
|
||||
var point = basePoints[i];
|
||||
var decodedPoint = decodedPoints[i];
|
||||
t.eq(point[0], decodedPoint[0]);
|
||||
t.eq(point[1], decodedPoint[1]);
|
||||
t.eq(parseInt(decodedPoint[0] * 1e5), point[0]);
|
||||
t.eq(parseInt(decodedPoint[1] * 1e5), point[1]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
var format = new OpenLayers.Format.EncodedPolyline();
|
||||
|
||||
t.eq(format.encode(basePoints, 2), encoded);
|
||||
t.eq(format.encode(basePoints, 2, 1), encoded);
|
||||
}
|
||||
|
||||
function test_encodeDeltas_returns_expected_value(t) {
|
||||
|
||||
Reference in New Issue
Block a user