mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
js: Convert static/js/lightbox_canvas.js to ES6 module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
8bbb0d9193
commit
1d64e7a8eb
@@ -131,7 +131,6 @@
|
||||
"$": false,
|
||||
"FetchStatus": false,
|
||||
"Filter": false,
|
||||
"LightboxCanvas": false,
|
||||
"ListCursor": false,
|
||||
"MessageListData": false,
|
||||
"MessageListView": false,
|
||||
|
||||
@@ -17,7 +17,6 @@ import "../i18n";
|
||||
import "../loading";
|
||||
import "../vdom";
|
||||
import "../keydown_util";
|
||||
import "../lightbox_canvas";
|
||||
import "../rtl";
|
||||
import "../rendered_markdown";
|
||||
import "../fold_dict";
|
||||
|
||||
1
static/js/global.d.ts
vendored
1
static/js/global.d.ts
vendored
@@ -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;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const {LightboxCanvas} = require("./lightbox_canvas");
|
||||
const people = require("./people");
|
||||
|
||||
let is_open = false;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user