126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
oGrammalecte.createStyle("content_scripts/panel_tf.css", null, document.head);
}
document.body.appendChild(this.xPanel);
}
}
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.setSizeAndPosition(`${this.nWidth}px`, `${nHeight}px`, "50%", "", "", "50%", `-${nHeight/2}px`, `-${this.nWidth/2}px`);
}
|
|
<
|
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
oGrammalecte.createStyle("content_scripts/panel_tf.css", null, document.head);
}
document.body.appendChild(this.xPanel);
}
}
show () {
this.xPanel.style.display = "flex";
}
hide () {
this.xPanel.style.display = "none";
}
center () {
let nHeight = (this.bFlexible) ? window.innerHeight-100 : this.nHeight;
this.setSizeAndPosition(`${this.nWidth}px`, `${nHeight}px`, "50%", "", "", "50%", `-${nHeight/2}px`, `-${this.nWidth/2}px`);
}
|
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
this.xPanel.style.marginLeft = sMarginLeft;
}
reduce () {
// todo
}
adjustHeight () {
this.xPanelContent.style.height = this.xPanelContent.firstChild.offsetHeight + "px"; // xPanelContent has only one child
this.xPanel.style.height = this.xPanelBar.offsetHeight + this.xPanelContent.offsetHeight + 10 + "px";
}
getWidth () {
return this.xPanelContent.offsetWidth;
}
logInnerHTML () {
// for debugging
console.log(this.xPanel.innerHTML);
|
<
<
<
<
<
|
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
this.xPanel.style.marginLeft = sMarginLeft;
}
reduce () {
// todo
}
getWidth () {
return this.xPanelContent.offsetWidth;
}
logInnerHTML () {
// for debugging
console.log(this.xPanel.innerHTML);
|