17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
this.xPanel = this._createPanel(sTitle);
this.center();
}
_createPanel (sTitle) {
try {
let xPanel = oGrammalecte.createNode("div", {id: this.sId, className: "grammalecte_panel"});
this.xPanelBar.appendChild(this._createButtons());
let xTitle = oGrammalecte.createNode("div", {className: "grammalecte_panel_title"});
xTitle.appendChild(this._createLogo());
xTitle.appendChild(oGrammalecte.createNode("div", {className: "grammalecte_panel_label", textContent: sTitle}));
this.xPanelBar.appendChild(xTitle);
xPanel.appendChild(this.xPanelBar);
xPanel.appendChild(this.xPanelContent);
|
>
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
this.xPanel = this._createPanel(sTitle);
this.center();
}
_createPanel (sTitle) {
try {
let xPanel = oGrammalecte.createNode("div", {id: this.sId, className: "grammalecte_panel"});
this.xPanelBar.appendChild(oGrammalecte.createNode("div", {className: "grammalecte_panel_invisible_marker", textContent: "__grammalecte_panel__"}));
this.xPanelBar.appendChild(this._createButtons());
let xTitle = oGrammalecte.createNode("div", {className: "grammalecte_panel_title"});
xTitle.appendChild(this._createLogo());
xTitle.appendChild(oGrammalecte.createNode("div", {className: "grammalecte_panel_label", textContent: sTitle}));
this.xPanelBar.appendChild(xTitle);
xPanel.appendChild(this.xPanelBar);
xPanel.appendChild(this.xPanelContent);
|
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
show () {
this.xPanel.style.display = "block";
}
hide () {
this.xPanel.style.display = "none";
}
center () {
let nHeight = (this.bFlexible) ? window.innerHeight-100 : this.nHeight;
this.xPanel.style = `top: 50%; left: 50%; width: ${this.nWidth}px; height: ${nHeight}px; margin-top: -${nHeight/2}px; margin-left: -${this.nWidth/2}px;`;
}
|
>
|
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
show () {
this.xPanel.style.display = "block";
}
hide () {
this.xPanel.style.display = "none";
oGrammalecte.clearRightClickedNode();
}
center () {
let nHeight = (this.bFlexible) ? window.innerHeight-100 : this.nHeight;
this.xPanel.style = `top: 50%; left: 50%; width: ${this.nWidth}px; height: ${nHeight}px; margin-top: -${nHeight/2}px; margin-left: -${this.nWidth/2}px;`;
}
|