js: Convert static/js/lightbox_canvas.js to ES6 module.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-02-10 07:46:05 -08:00
committed by Tim Abbott
parent 8bbb0d9193
commit 1d64e7a8eb
5 changed files with 2 additions and 9 deletions

View File

@@ -1,5 +1,3 @@
"use strict";
const funcs = {
setZoom(meta, zoom) {
// condition to handle zooming event by zoom hotkeys
@@ -206,7 +204,7 @@ const funcs = {
},
};
class LightboxCanvas {
export class LightboxCanvas {
meta = {
direction: -1,
zoom: 1,
@@ -270,6 +268,3 @@ class LightboxCanvas {
this.meta.resize_handler = callback;
}
}
module.exports = LightboxCanvas;
window.LightboxCanvas = LightboxCanvas;