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

Update dependency medium-zoom to v1 #6

Merged
merged 2 commits into from
Jan 20, 2019
Merged

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Dec 28, 2018

This PR contains the following updates:

Package Type Update Change References
medium-zoom dependencies major 0.4.0 -> 1.0.2 source

Release Notes

francoischalifour/medium-zoom

v1.0.2

Compare Source

  • Improve TypeScript definition (#​73)

v1.0.1

Compare Source

Bug fixes
  • Don't prevent behavior of all clicks (71b46fa)

v1.0.0

Compare Source

New features

  • Methods become chainable. All methods except getters and animation methods (open(), close() and toggle()) return the zoom object to allow method calls to be chained.
const zoom = mediumZoom()

zoom
  .attach('#image-1', '#image-2')
  .on('open', () => zoom.update({ background: 'yellow' }))
  .open()
  • Animation methods return promises. open(), close() and toggle() return promises resolving with the zoom for acting accordingly when the animation is completed. To remain compatible with IE10, promises are converted to no-operation functions if unavailable.
const zoom = mediumZoom('[data-zoom]')

zoom.open().then(() => zoom.update({ background: 'yellow' }))
  • Options

  • Methods

    • attach(...selectors: string[]|Element[]|NodeList[]|Array[]) => Zoom
    • clone(options?: object) => Zoom
    • getOptions() => object
    • getImages() => Element[]
    • getZoomedImage() => Element
  • Events

    • "update" is fired when the update method is called
  • Add TypeScript definitions

  • Improve documentation

Bug fixes

  • HD image scales the first time on Firefox (264c81f)
  • Support srcset attribute (#​51)
  • Support SVG sources (#​56)

Breaking changes

  • Imports. If you're using CommonJS, you'll need to change the require statement:
- const mediumZoom = require('medium-zoom').default
+ const mediumZoom = require('medium-zoom')
  • No images selected by default. Prior to version 1, all scaled images (via HTML or CSS properties) were added to the zoom when calling mediumZoom(). Now, calling mediumZoom() without selector does not attach any images to the zoom. This change is necessary for having a more predictable behavior and a more composable API.

  • Options

    • metaClick was removed
  • Methods

    • show() => voidopen({ target?: Element }) => Promise<Zoom>
    • hide() => voidclose() => Promise<Zoom>
    • toggle() => voidtoggle({ target?: Element }) => Promise<Zoom>
    • detach() => voiddetach(...selectors: string[]|Element[]|NodeList[]|Array[]) => Zoom
    • update(options: object) => voidupdate(options: object) => Zoom
    • addEventListeners(type: string, listener: Function) => voidon(type: string, listener: Function, options?: object) => Zoom
    • removeEventListeners(type: string, listener: Function) => voidoff(type: string, listener: Function, options?: object) => Zoom
  • Attributes

    • data-zoom-targetdata-zoom-src
  • Events

    • "show" → "open"
    • "shown" → "opened"
    • "hide" → "close"
    • "hidden" → "closed"

Special thanks

@​tuelsch, @​garviand and @​mimamuh.


Renovate configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "rebase!".

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot. View repository job log here.

@renovate renovate bot assigned hmsk Dec 28, 2018
@renovate renovate bot force-pushed the renovate/medium-zoom-1.x branch 2 times, most recently from f856a90 to d8c369c Compare January 1, 2019 08:59
@hmsk
Copy link
Member

hmsk commented Jan 1, 2019

Failing the build with compile error by the new version of medium-zoom. Just sent a PR to fix the problem francoischalifour/medium-zoom#82

1.0.2 had the problem for typings
@renovate
Copy link
Author

renovate bot commented Jan 20, 2019

PR has been edited

👷 This PR has received other commits, so Renovate will stop updating it to avoid conflicts or other problems. If you wish to abandon your changes and have Renovate start over then you can add the label rebase to this PR and Renovate will reset/recreate it.

@hmsk hmsk merged commit 228bae3 into master Jan 20, 2019
@hmsk hmsk deleted the renovate/medium-zoom-1.x branch January 20, 2019 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants