forked from withanage/lens
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmath_panel.js
59 lines (48 loc) · 1.61 KB
/
math_panel.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
"use strict";
var Lens = require('lens/reader');
var ContainerPanel = Lens.ContainerPanel;
var ContainerPanelController = Lens.ContainerPanelController;
var ContainerPanelView = Lens.ContainerPanelView;
var ResourcePanelViewFactory = Lens.ResourcePanelViewFactory;
var MathPanelView = function() {
ContainerPanelView.apply(this, arguments);
};
MathPanelView.Prototype = function() {
var __super__ = ContainerPanelView.prototype;
this.render = function() {
__super__.render.call(this);
this.$el.append(this.$showUnreferenced);
return this;
};
};
MathPanelView.Prototype.prototype = ContainerPanelView.prototype;
MathPanelView.prototype = new MathPanelView.Prototype();
var MathPanelController = function() {
ContainerPanelController.apply(this, arguments);
};
MathPanelController.Prototype = function() {
this.createView = function() {
var doc = this.getDocument();
var viewFactory = new ResourcePanelViewFactory(doc.nodeTypes, this.config);
return new MathPanelView(this, viewFactory, this.config);
};
};
MathPanelController.Prototype.prototype = ContainerPanelController.prototype;
MathPanelController.prototype = new MathPanelController.Prototype();
var MathPanel = function() {
ContainerPanel.call(this, {
type: 'resource',
name: 'math',
container: 'math',
title: 'Math',
icon: 'fa-superscript',
});
};
MathPanel.Prototype = function() {
this.createController = function(doc) {
return new MathPanelController(doc, this.config);
};
};
MathPanel.Prototype.prototype = ContainerPanel.prototype;
MathPanel.prototype = new MathPanel.Prototype();
module.exports = MathPanel;