@sequent-org/moodboard 1.2.35 → 1.2.36
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
|
@@ -48,11 +48,9 @@ export class PlacementTool extends BaseTool {
|
|
|
48
48
|
this.app.view.style.cursor = (cur === 'default') ? '' : cur;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
// Показываем призрак для
|
|
51
|
+
// Показываем призрак для записки, эмоджи, фрейма или фигур, если они активны
|
|
52
52
|
if (this.pending && this.app && this.world) {
|
|
53
|
-
if (this.pending.type === '
|
|
54
|
-
this.showTextGhost();
|
|
55
|
-
} else if (this.pending.type === 'note') {
|
|
53
|
+
if (this.pending.type === 'note') {
|
|
56
54
|
this.showNoteGhost();
|
|
57
55
|
} else if (this.pending.type === 'emoji') {
|
|
58
56
|
this.showEmojiGhost();
|
|
@@ -154,9 +152,7 @@ export class PlacementTool extends BaseTool {
|
|
|
154
152
|
} else if (this.selectedImage) {
|
|
155
153
|
this.showImageGhost();
|
|
156
154
|
} else if (this.pending) {
|
|
157
|
-
if (this.pending.type === '
|
|
158
|
-
this.showTextGhost();
|
|
159
|
-
} else if (this.pending.type === 'note') {
|
|
155
|
+
if (this.pending.type === 'note') {
|
|
160
156
|
this.showNoteGhost();
|
|
161
157
|
} else if (this.pending.type === 'emoji') {
|
|
162
158
|
this.showEmojiGhost();
|
|
@@ -256,14 +252,10 @@ export class PlacementTool extends BaseTool {
|
|
|
256
252
|
};
|
|
257
253
|
|
|
258
254
|
if (isTextWithEditing) {
|
|
259
|
-
// Для текста
|
|
260
|
-
// чтобы позиция совпадала пиксель-в-пиксель
|
|
261
|
-
const fontSize = props.fontSize || 18;
|
|
262
|
-
const ghostWidth = 120;
|
|
263
|
-
const ghostHeight = fontSize + 20;
|
|
255
|
+
// Для текста позиция должна совпадать с точкой клика без смещений
|
|
264
256
|
position = {
|
|
265
|
-
x: Math.round(worldPoint.x
|
|
266
|
-
y: Math.round(worldPoint.y
|
|
257
|
+
x: Math.round(worldPoint.x),
|
|
258
|
+
y: Math.round(worldPoint.y)
|
|
267
259
|
};
|
|
268
260
|
// Слушаем событие создания объекта, чтобы получить его ID
|
|
269
261
|
const handleObjectCreated = (objectData) => {
|