Compare commits
1 Commits
release-2.
...
release-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
743b2add10 |
@@ -106,8 +106,8 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
|
||||
|
||||
/**
|
||||
* APIProperty: isBaseLayer
|
||||
* {Boolean} The layer is a base layer. Default is false. Set this property
|
||||
* in the layer options.
|
||||
* {Boolean} The layer is a base layer. Default is true. Set this property
|
||||
* in the layer options
|
||||
*/
|
||||
isBaseLayer: false,
|
||||
|
||||
|
||||
@@ -1402,10 +1402,6 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
var size = new OpenLayers.Size(this.div.clientWidth,
|
||||
this.div.clientHeight);
|
||||
|
||||
if (size.w == 0 && size.h == 0 || isNaN(size.w) && isNaN(size.h)) {
|
||||
size.w = this.div.offsetWidth;
|
||||
size.h = this.div.offsetHeight;
|
||||
}
|
||||
if (size.w == 0 && size.h == 0 || isNaN(size.w) && isNaN(size.h)) {
|
||||
size.w = parseInt(this.div.style.width);
|
||||
size.h = parseInt(this.div.style.height);
|
||||
|
||||
@@ -358,11 +358,10 @@ OpenLayers.Protocol.HTTP = OpenLayers.Class(OpenLayers.Protocol, {
|
||||
* the feature received from the server.
|
||||
*/
|
||||
update: function(feature, options) {
|
||||
options = options || {};
|
||||
options = OpenLayers.Util.applyDefaults(options, this.options);
|
||||
var url = options.url ||
|
||||
feature.url ||
|
||||
this.options.url + "/" + feature.fid;
|
||||
options = OpenLayers.Util.applyDefaults(options, this.options);
|
||||
|
||||
var resp = new OpenLayers.Protocol.Response({
|
||||
reqFeatures: feature,
|
||||
@@ -409,11 +408,10 @@ OpenLayers.Protocol.HTTP = OpenLayers.Class(OpenLayers.Protocol, {
|
||||
* completes.
|
||||
*/
|
||||
"delete": function(feature, options) {
|
||||
options = options || {};
|
||||
options = OpenLayers.Util.applyDefaults(options, this.options);
|
||||
var url = options.url ||
|
||||
feature.url ||
|
||||
this.options.url + "/" + feature.fid;
|
||||
options = OpenLayers.Util.applyDefaults(options, this.options);
|
||||
|
||||
var resp = new OpenLayers.Protocol.Response({
|
||||
reqFeatures: feature,
|
||||
|
||||
@@ -340,7 +340,7 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
|
||||
}
|
||||
|
||||
var rotation = style.rotation;
|
||||
if ((rotation !== undefined || node._rotation !== undefined) && pos) {
|
||||
if (node._rotation !== rotation && pos) {
|
||||
node._rotation = rotation;
|
||||
rotation |= 0;
|
||||
if(node.nodeName !== "svg") {
|
||||
|
||||
@@ -19,7 +19,7 @@ OpenLayers.Strategy.Fixed = OpenLayers.Class(OpenLayers.Strategy, {
|
||||
* APIProperty: preload
|
||||
* {Boolean} Load data before layer made visible. Enabling this may result
|
||||
* in considerable overhead if your application loads many data layers
|
||||
* that are not visible by default. Default is false.
|
||||
* that are not visible by default. Default is true.
|
||||
*/
|
||||
preload: false,
|
||||
|
||||
|
||||
@@ -696,34 +696,6 @@
|
||||
OpenLayers.Request.PUT = _put;
|
||||
}
|
||||
|
||||
function test_update_featureurl(t) {
|
||||
|
||||
// test that OpenLayers.Request.PUT receives the URL
|
||||
// set in the feature
|
||||
// http://trac.openlayers.org/ticket/2393#comment:11
|
||||
|
||||
t.plan(1);
|
||||
|
||||
var protocol = new OpenLayers.Protocol.HTTP({
|
||||
'url': 'foo_url',
|
||||
'format': {'write': function() {}}
|
||||
});
|
||||
|
||||
// feature to pass to update
|
||||
var feature = {'feature':'feature', 'url': 'bar_url'};
|
||||
|
||||
var _put = OpenLayers.Request.PUT;
|
||||
|
||||
OpenLayers.Request.PUT = function(options) {
|
||||
t.eq(options.url, feature.url,
|
||||
'PUT called with correct url in options');
|
||||
};
|
||||
|
||||
protocol.update(feature);
|
||||
|
||||
OpenLayers.Request.PUT = _put;
|
||||
}
|
||||
|
||||
function test_handleResponse(t) {
|
||||
t.plan(6);
|
||||
|
||||
@@ -845,34 +817,6 @@
|
||||
OpenLayers.Request.DELETE = _delete;
|
||||
}
|
||||
|
||||
function test_delete_featureurl(t) {
|
||||
|
||||
// test that OpenLayers.Request.DELETE receives the URL
|
||||
// set in the feature
|
||||
// http://trac.openlayers.org/ticket/2393#comment:11
|
||||
|
||||
t.plan(1);
|
||||
|
||||
var protocol = new OpenLayers.Protocol.HTTP({
|
||||
'url': 'foo_url',
|
||||
'format': {'write': function() {}}
|
||||
});
|
||||
|
||||
// feature to pass to update
|
||||
var feature = {'feature':'feature', 'url': 'bar_url'};
|
||||
|
||||
var _delete = OpenLayers.Request.DELETE;
|
||||
|
||||
OpenLayers.Request.DELETE = function(options) {
|
||||
t.eq(options.url, feature.url,
|
||||
'DELETE called with correct url in options');
|
||||
};
|
||||
|
||||
protocol['delete'](feature);
|
||||
|
||||
OpenLayers.Request.DELETE = _delete;
|
||||
}
|
||||
|
||||
function test_handleDelete(t) {
|
||||
t.plan(4);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user