@sequent-org/moodboard 1.4.68 → 1.4.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/core/PixiEngine.js
CHANGED
|
@@ -13,6 +13,25 @@ export class PixiEngine {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async init() {
|
|
16
|
+
// Некоторые GPU (мобильные планшеты) поддерживают меньше MSAA-сэмплов, чем Pixi
|
|
17
|
+
// запрашивает для render-target/фильтров. Без ограничения это даёт
|
|
18
|
+
// "renderbufferStorageMultisample: samples too large" → incomplete framebuffer →
|
|
19
|
+
// объекты не отрисовываются. Обрезаем число сэмплов до максимума устройства.
|
|
20
|
+
if (typeof WebGL2RenderingContext !== 'undefined') {
|
|
21
|
+
const proto = WebGL2RenderingContext.prototype;
|
|
22
|
+
if (!proto.__mbMsaaClamped && typeof proto.renderbufferStorageMultisample === 'function') {
|
|
23
|
+
const origRBSM = proto.renderbufferStorageMultisample;
|
|
24
|
+
proto.renderbufferStorageMultisample = function (target, samples, internalformat, width, height) {
|
|
25
|
+
try {
|
|
26
|
+
const max = this.getParameter(this.MAX_SAMPLES) || 0;
|
|
27
|
+
if (max && samples > max) { samples = max; }
|
|
28
|
+
} catch (_) {}
|
|
29
|
+
return origRBSM.call(this, target, samples, internalformat, width, height);
|
|
30
|
+
};
|
|
31
|
+
proto.__mbMsaaClamped = true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
16
35
|
this.app = new PIXI.Application({
|
|
17
36
|
width: this.options.width,
|
|
18
37
|
height: this.options.height,
|
|
@@ -218,6 +218,7 @@ export function bindTextEditorInteractions(controller, {
|
|
|
218
218
|
finalize,
|
|
219
219
|
listType,
|
|
220
220
|
}) {
|
|
221
|
+
const editorCreatedAt = Date.now();
|
|
221
222
|
const blurHandler = () => {
|
|
222
223
|
const editorObjectId = controller?.textEditor?.objectId || null;
|
|
223
224
|
setTimeout(() => {
|
|
@@ -227,6 +228,14 @@ export function bindTextEditorInteractions(controller, {
|
|
|
227
228
|
if ((controller?.textEditor?.objectId || null) !== editorObjectId) return;
|
|
228
229
|
if (controller?.textEditor?._closingByOutside) return;
|
|
229
230
|
|
|
231
|
+
// На touch создающий тап порождает синтетический mousedown по холсту,
|
|
232
|
+
// который тут же снимает фокус с только что созданного пустого поля.
|
|
233
|
+
// В течение короткого окна после создания не финализируем, а возвращаем фокус.
|
|
234
|
+
if (isNewCreation && (Date.now() - editorCreatedAt) < 400) {
|
|
235
|
+
try { textarea.focus(); } catch (_) {}
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
|
|
230
239
|
const value = (textarea.value || '').trim();
|
|
231
240
|
if (isNewCreation && value.length === 0) {
|
|
232
241
|
// Записка и фигура остаются на доске пустыми: finalize(true) при пустом
|