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LErT/oW/63tPV6uJwmKoOND78u7Fg5NhAAD4CVbzY9cwrWQrAAAAAElFTkSuQmCC";
return xImg;
}
_createButtons () {
let xButtonLine = oGrammalecte.createNode("div", {className: "grammalecte_panel_commands"});
xButtonLine.appendChild(this.xWaitIcon);
if (this.sId === "grammalecte_gc_panel") {
this.xClipboardButton = this._createCopyButton();
xButtonLine.appendChild(this.xClipboardButton);
}
if (this.bFlexible) {
this.xWidthButton = this._createMoveButton("changeWidth", " ", "Étendre en largeur");
this.xHeightButton = this._createMoveButton("changeHeight", " ", "Étendre en hauteur");
xButtonLine.appendChild(this.xWidthButton);
|
|
|
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
xImg.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAC8UlEQVQ4jX3TbUgTcRwH8P89ddu5u9tt082aZmpFEU4tFz0QGTUwCi0heniR9MSUIKRaD0RvIlKigsooo+iNFa0XJYuwIjEK19OcDtPElsG0ktyp591t7u7+vUh7MPX3+vf5/n8/+P0BmKJIPUUVlh2rdVVeesWlzEybqg+bFOsoylnqPmNavGFfknV2Omu2Lvja3vxAURKJib3opHizu8riLK6gjRyuKgmoSoMRFENRUqfXTzvBGK62LC2uoFkOl4RhjQ8+qWt7dPNE3sbdp+2LXbsGe9qb4rIo/BfwFy6nWQ4ThWGNDzbcfu29dMDh2nHU7CypYNLmzTda0/L5cNuzmDQi/A4Y27k6eQxLI79wS/11D0AAMNvs6XT6ojVJjJEgTbMy2BT77xBMp09KcpaWV1uc41jQoi0NdUHfjeOO9WWn7AVF7s7n986SithPJGeupBh2PCSP/xxqxAp3eq6wuUV7Wc6MSZIEhA8vHjbfOe/OcW3zmAuKy+nUzAyD2bow8ODaEROFq8AyZ5WBYdEZXGqGxZ61HJV+9HYCJRbTNA0QBA40HWunaKN5dKg/DBKxeCIe09Th/m4MJwiMSZmLEzMQAABQRuNqgu8NYX3doTcMpvCkLbtQZ2AJkrPOZG1zlnY13T+Hy9EehY90h57eqcorcZ/lctZuMzAsOjLEqwNv66/6vZcPYRBC+C3cGaBxhSet2av1BpYgTTY7k5y2JPT41slIR6Axv8R9nnOs+4Pf+2r992uOxGVJwgAAAEINfgt3BGgsESWtWas1iGDyl+CT/u7WpvxNFRc4x7qtBoZFhSFejb7z1fq9NYfjsiT+cwcQavBruCOgU4SIGo18amuoq3Js3FNlynVtH385+s53ze+t8cRkURx3yMTTRBAEQVAUXbFlf3XystJKA2NExeFBdWASDAAA+MQACCEEmqbJ0b6PMC7JwhDU8YFHV5u9NZ64LErT/oW/63tPV6uJwmKoOND78u7Fg5NhAAD4CVbzY9cwrWQrAAAAAElFTkSuQmCC";
return xImg;
}
_createButtons () {
let xButtonLine = oGrammalecte.createNode("div", {className: "grammalecte_panel_commands"});
xButtonLine.appendChild(this.xWaitIcon);
if (this.sId === "grammalecte_gc_panel" && !bThunderbird) {
this.xClipboardButton = this._createCopyButton();
xButtonLine.appendChild(this.xClipboardButton);
}
if (this.bFlexible) {
this.xWidthButton = this._createMoveButton("changeWidth", " ", "Étendre en largeur");
this.xHeightButton = this._createMoveButton("changeHeight", " ", "Étendre en hauteur");
xButtonLine.appendChild(this.xWidthButton);
|
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
setSizeAndPosition () {
// size
if (this.xWidthButton && this.xHeightButton) {
this.xWidthButton.style.opacity = (this.bHorizStrech) ? ".9" : "";
this.xHeightButton.style.opacity = (this.bVertStrech) ? ".9" : "";
}
let nWidth = Math.min(this.nWidth, window.innerWidth-200);
let nHeight = Math.min(this.nHeight, window.innerHeight-100);
if (this.bFlexible) {
// width
if (this.bHorizStrech) {
nWidth = Math.min(this.nWidth*1.33, window.innerWidth-200);
}
// height
nHeight = ([4, 5, 6].includes(this.nPosition)) ? nHeight : Math.floor(window.innerHeight*0.45);
if (this.bVertStrech) {
nHeight = ([4, 5, 6].includes(this.nPosition)) ? (window.innerHeight-100) : Math.floor(window.innerHeight*0.67);
}
}
this.xPanel.style.width = `${nWidth}px`;
this.xPanel.style.height = `${nHeight}px`;
// position
let oPos = null;
switch (this.nPosition) {
|
|
|
|
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
setSizeAndPosition () {
// size
if (this.xWidthButton && this.xHeightButton) {
this.xWidthButton.style.opacity = (this.bHorizStrech) ? ".9" : "";
this.xHeightButton.style.opacity = (this.bVertStrech) ? ".9" : "";
}
let nWidth = Math.min(this.nWidth, window.innerWidth-200);
let nHeight = Math.min(this.nHeight, window.innerHeight-50);
if (this.bFlexible) {
// width
if (this.bHorizStrech) {
nWidth = Math.min(this.nWidth*1.33, window.innerWidth-200);
}
// height
nHeight = ([4, 5, 6].includes(this.nPosition)) ? nHeight : Math.floor(window.innerHeight*0.45);
if (this.bVertStrech) {
nHeight = ([4, 5, 6].includes(this.nPosition)) ? (window.innerHeight-50) : Math.floor(window.innerHeight*0.67);
}
}
this.xPanel.style.width = `${nWidth}px`;
this.xPanel.style.height = `${nHeight}px`;
// position
let oPos = null;
switch (this.nPosition) {
|