Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 3.0 #406

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft

Release 3.0 #406

wants to merge 2 commits into from

Conversation

codeofsumit
Copy link
Contributor

This release branch aims to collect breaking changes until we can release the next major version.
It has to constantly stay in sync with the develop and master branch to avoid extensive merge conflicts down the road.

@codeofsumit codeofsumit added this to the 3.0 milestone Feb 19, 2019
@Falke-Design
Copy link
Collaborator

Should be also removed:

L.PM.Draw.Marker, L.PM.Draw.CircleMarker:

this._map.fire('pm:create', {
      shape: this._shape,
      marker, // DEPRECATED
      layer: marker,
    });

L.PM.Draw.Line:

    // fallback option for finishOnDoubleClick
    // TODO: remove in a later release
    if (this.options.finishOnDoubleClick && !this.options.finishOn) {
      this.options.finishOn = 'dblclick';
    }

L.PM.Map:

enableDraw(shape = 'Polygon', options) {
    // backwards compatible, remove after 3.0
    if (shape === 'Poly') {
      shape = 'Polygon';
    }
   //...


disableDraw(shape = 'Polygon') {
    // backwards compatible, remove after 3.0
    if (shape === 'Poly') {
      shape = 'Polygon';
    }
   //...

@Falke-Design
Copy link
Collaborator

Falke-Design commented May 27, 2020

Also old button nams in L.PM.Toolbar in addControls() and toggleButton()

    // make button renaming backwards compatible
    if (typeof options.editPolygon !== 'undefined') {
      options.editMode = options.editPolygon;
    }
    if (typeof options.deleteLayer !== 'undefined') {
      options.removalMode = options.deleteLayer;
    }

@Falke-Design
Copy link
Collaborator

Thinking of changing the event markerdragstart into vertexdragstart same for the other "marker" events. It would be a clearer name

@Falke-Design
Copy link
Collaborator

Remove the first argument e, because it is also in the object:
L.Controls:

  _triggerClick(e) {
    // TODO is this a big change when we change from e to a object with the event and the button? Now it's the second argument
    this._button.onClick(e, { button: this, event: e });
    this._clicked(e);
    this._button.afterClick(e, { button: this, event: e });
  },

@Falke-Design
Copy link
Collaborator

Thinking of rename Line to Polyline. To match the leaflet default

@Falke-Design
Copy link
Collaborator

Change the option name

editable false makes a CircleMarker editable like a Circle

@Falke-Design
Copy link
Collaborator

Remove the optional shape it has no function, all shapes will be disabled:

disableDraw(shape = 'Polygon') {
// backwards compatible, remove after 3.0
if (shape === 'Poly') {
shape = 'Polygon';
}
this.Draw.disable(shape);
},

@Falke-Design
Copy link
Collaborator

Mode.Edit, Mode.Drag, ... add _ to private functions

@Falke-Design
Copy link
Collaborator

Make _removeLastVertex() to a public function

@Falke-Design
Copy link
Collaborator

L.PM.Map and all Modes change this.map to this._map. Then it is used the same name as in the Draw and Edit Classes

@Falke-Design
Copy link
Collaborator

rename _finishShape() and _createMarker to the same name and make it public

@Falke-Design
Copy link
Collaborator

Add to all CSS classes the prefix leaflet-geoman. More and more libraries have problems with using the same CSS-Class name. Like .active

@Falke-Design
Copy link
Collaborator

Draw.Line uses templineStyle, Draw.Rectangle uses pathOptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants