OpenLayers OpenLayers

Ticket #1564 (closed feature: fixed)

Opened 2 years ago

Last modified 2 years ago

extend and applyDefaults should allow undefined first arg

Reported by: tschaub Assigned to:
Priority: minor Milestone: 2.7 Release
Component: Util Version: 2.6
Keywords: Cc:
State: Complete

Description

There are a number of places where it would require less code if applyDefaults and extend accepted undefined as the first arg.

Attachments

util.patch (6.6 kB) - added by tschaub on 05/30/08 18:08:13.
flexible extend and applyDefaults

Change History

05/30/08 18:08:13 changed by tschaub

  • attachment util.patch added.

flexible extend and applyDefaults

05/30/08 18:11:10 changed by tschaub

  • state set to Review.

All tests pass in FF. Examples work.

05/30/08 21:30:04 changed by pspencer

  • state changed from Review to Commit.

reviewed, patch looks good. The change to Layer/WFS.js appears unrelated (but still a reasonable change).

(follow-up: ↓ 4 ) 05/31/08 07:08:20 changed by elemoine

My review:

  • in KML.js why don't you just do: OpenLayers.Util.extend(feature.style, inlineStyle) and actually ignore the return value?
  • the above comment applies to your changes in MapServer.js, WorldWind.js, KaMap.js

Thanks Tim,

(in reply to: ↑ 3 ) 06/05/08 15:34:29 changed by tschaub

Replying to elemoine:

My review: * in KML.js why don't you just do: OpenLayers.Util.extend(feature.style, inlineStyle) and actually ignore the return value?

If feature.style is undefined before the extend, it still will be afterwards.

* the above comment applies to your changes in MapServer.js, WorldWind.js, KaMap.js

Ditto (but substitute params).

Thanks Tim,

06/05/08 15:37:40 changed by tschaub

  • status changed from new to closed.
  • state changed from Commit to Complete.
  • resolution set to fixed.

(In [7311]) Adding a bit of flexibility to extend and applyDefaults. First argument can now be undefined. r=pspencer,elemoine (closes #1564)