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

Make SVG Icon more extensible #119

Open
bozdoz opened this issue Dec 18, 2020 · 1 comment
Open

Make SVG Icon more extensible #119

bozdoz opened this issue Dec 18, 2020 · 1 comment
Labels

Comments

@bozdoz
Copy link
Owner

bozdoz commented Dec 18, 2020

should be easy enough to alter the svg through Leaflet options in JavaScript, or maybe through PHP (not a fan).

For example: https://github.com/bozdoz/wp-plugin-leaflet-map/blob/master/scripts/leaflet-svg-icon.js#L37-L44

var path = svgCreate('path', {
  fill: this.options.background,
  d:
    'M182.9,551.7c0,0.1,0.2,0.3,0.2,0.3S358.3,' +
    '283,358.3,194.6c0-130.1-88.8-186.7-175.4-186.9' +
    'C96.3,7.9,7.5,64.5,7.5,194.6c0,88.4,175.3,357.4,' +
    '175.3,357.4S182.9,551.7,182.9,551.7z',
});

d could be this.options.path, or something.

We could set some default values in the admin ("svg path", or something with the default).

@bozdoz bozdoz added the Feature label Dec 18, 2020
@bozdoz
Copy link
Owner Author

bozdoz commented Dec 18, 2020

Good pick for a custom variable #118

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

No branches or pull requests

1 participant