Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Link layers to styles if style already exist #26

Closed
tijmenvangurp opened this issue Jan 21, 2019 · 1 comment
Closed

Link layers to styles if style already exist #26

tijmenvangurp opened this issue Jan 21, 2019 · 1 comment

Comments

@tijmenvangurp
Copy link

tijmenvangurp commented Jan 21, 2019

Scenario:

Style already exists in shared styles.

I select a layer with the same name as the already available style.

Result: nothing happens
Expected result: I would expect that the layer would be linked to the shared style.

My proposal for udpate:

// update shared styles, and sync instances
const update = (sharedStyles, sharedStyle, layer) => {
  if (layer.hasOwnProperty('sharedStyle')) {
    layer.sharedStyle.style = layer.style;
  }else{
    layer.sharedStyleId = sharedStyle.id;
  }
@lucaorio
Copy link
Owner

lucaorio commented Apr 9, 2019

@tijmenvangurp I just pushed a couple of fixes, and implemented a few new features. Thanks for the patience! 🙏

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

No branches or pull requests

2 participants