bluehalo / ngx-leaflet-draw

MIT License
88 stars 29 forks source link

Change circle edit icon #58

Closed adeptb closed 6 years ago

adeptb commented 6 years ago

Hello! How can i change cirle and other elements edit icon? These code doesnt work:

 public ngOnInit() {
    L.Edit.Circle = L.Edit.Circle.extend({
      options: {
        moveIcon: new L.DivIcon({
          iconSize: new L.Point(8, 8),
          className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-move'
        }),
        resizeIcon: new L.DivIcon({
          iconSize: new L.Point(8, 8),
          className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-resize'
        }),
        touchMoveIcon: new L.DivIcon({
          iconSize: new L.Point(8, 8),
          className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon'
        }),
        touchResizeIcon: new L.DivIcon({
          iconSize: new L.Point(8, 8),
          className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon'
        })
      }
    });
  }

Thank you!

adeptb commented 6 years ago

I dont know why, but i tried the following code again and it works. Thank you.