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

@@ -131,7 +131,6 @@
"$": false,
"FetchStatus": false,
"Filter": false,
"LightboxCanvas": false,
"ListCursor": false,
"MessageListData": false,
"MessageListView": false,

View File

@@ -17,7 +17,6 @@ import "../i18n";
import "../loading";
import "../vdom";
import "../keydown_util";
import "../lightbox_canvas";
import "../rtl";
import "../rendered_markdown";
import "../fold_dict";

View File

@@ -5,7 +5,6 @@
declare let FetchStatus: any;
declare let Filter: any;
declare let LightboxCanvas: any;
declare let ListCursor: any;
declare let MessageListData: any;
declare let MessageListView: any;

View File

@@ -1,5 +1,6 @@
"use strict";
const {LightboxCanvas} = require("./lightbox_canvas");
const people = require("./people");
let is_open = false;

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;