viewerjs icon indicating copy to clipboard operation
viewerjs copied to clipboard

feat: pass the future imageData object to the view callback #586

Open M393 opened this issue 1 year ago • 1 comments

This allows setting an initial rotation before an image is displayed. Resolves #586

new Viewer(dummyDiv, {
  // ...
  view: function (event) {
    event.detail.imageData.rotate = 90;
  },

Summary

What kind of change does this PR introduce? (check at least one)

  • [ ] Bugfix
  • [x] Feature
  • [ ] Code style update
  • [ ] Refactor
  • [ ] Docs
  • [ ] Build-related changes
  • [ ] Other, please describe:

If changing the UI of the default theme, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • [ ] Yes
  • [x] No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • [x] When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • [x] Chrome 108
  • [x] Firefox 110
  • [ ] Safari
  • [ ] Edge
  • [ ] IE

If adding a new feature, the PR's description includes:

  • [x] A convincing reason for adding this feature
  • [ ] Related documents have been updated
  • [ ] Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

M393 avatar Feb 07 '23 11:02 M393