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 track properties in Link interaction configurable #14126

Merged
merged 1 commit into from Sep 16, 2022

Conversation

ahocevar
Copy link
Member

This pull request adds a trackProperties option to ol/interaction/Link. With that, users can e.g. opt out of tracking the visible layers.

In addition, this pull request fixes an issue with history state when it is not purely managed by the Link interaction. This is done by passing the current history.state as first argument to history.pushState() or history.replaceState()

@github-actions
Copy link

📦 Preview the website for this branch here: https://deploy-preview-14126--ol-site.netlify.app/.

/**
* @typedef {Object} Options
* @property {boolean|import('../View.js').AnimationOptions} [animate=true] Animate view transitions.
* @property {Array<TrackProperties>} [trackProperties=['x', 'y', 'z', 'r', 'l']] Properties to track. Default is to track
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit, when reading this below, I keep thinking of "track" the noun, like a racetrack or a GPS track. Feels like properties or params (maybe overused, but I think people know "query params") would be more natural.

@ahocevar
Copy link
Member Author

params sounds good - changed accordingly.

@ahocevar ahocevar merged commit af67bb2 into openlayers:main Sep 16, 2022
@ahocevar ahocevar deleted the link-properties branch September 16, 2022 21:24
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