-
Notifications
You must be signed in to change notification settings - Fork 116
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
chore(log): Add log for image zoom click #1234
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how useful of a viewer event this would be from an SDK perspective. Is this way preferred over using resin tags to track activity?
Discussed offline. Summary: I first tried adding resin tag to the |
@@ -373,10 +373,12 @@ class ImageBaseViewer extends BaseViewer { | |||
if (!this.isPannable && this.isZoomable) { | |||
// If the mouse up was not due to panning, and the image is zoomable, then zoom in. | |||
this.zoom('in'); | |||
this.emitMetric(VIEWER_EVENT.imageZoomClick, 'in'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like we already have a zoom
event emitted from the viewers -- could we enhance that to include an interactionType
or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zoom
event emitted from viewers doesn't get logged. Adding listener to viewer to specifically log zoom
event in Preview.js
adds a lot of complications to this PR. Instead, I just changed the event name to zoom
for scalability and consistence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what way does it add complexity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what way does it add complexity?
So now it's a two-lines change. If we use emit('zoom')
, we need to implement a zoom
event handler and attach it in attachViewerListeners
in Preview.js
, which sounds more complex than two lines.
No description provided.