@sequent-org/moodboard 1.4.48 → 1.4.49
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 +1 -1
- package/src/core/events/Events.js +2 -0
- package/src/core/flows/ClipboardFlow.js +13 -0
- package/src/moodboard/bootstrap/MoodBoardUiFactory.js +1 -1
- package/src/objects/ImageObject.js +5 -0
- package/src/ui/ImagePropertiesPanel.js +1473 -4
- package/src/ui/comments/CommentThreadPopover.js +68 -0
- package/src/ui/connectors/ConnectionAnchorsLayer.js +8 -1
- package/src/ui/styles/panels.css +388 -1
- package/src/utils/applyRoundedMask.js +39 -0
package/package.json
CHANGED
|
@@ -173,8 +173,10 @@ export const Events = {
|
|
|
173
173
|
ThreadDeleted: 'comment:thread:deleted',
|
|
174
174
|
DraftOpened: 'comment:draft:opened',
|
|
175
175
|
DraftClosed: 'comment:draft:closed',
|
|
176
|
+
PopoverClosed: 'comment:popover:closed',
|
|
176
177
|
ResolvedFilterChanged: 'comment:resolved:filter:changed',
|
|
177
178
|
ListOpened: 'comment:list:opened',
|
|
179
|
+
OpenImageDraft: 'comment:open:image:draft',
|
|
178
180
|
},
|
|
179
181
|
};
|
|
180
182
|
|
|
@@ -2,6 +2,16 @@ import { Events } from '../events/Events.js';
|
|
|
2
2
|
import { PasteObjectCommand } from '../commands/index.js';
|
|
3
3
|
import { RevitScreenshotMetadataService } from '../../services/RevitScreenshotMetadataService.js';
|
|
4
4
|
|
|
5
|
+
// Дубликат AI-изображения — полноправный член ряда генераций, но ему нужен
|
|
6
|
+
// собственный слот. Слот привязан к properties.aiMessageId, поэтому копия должна
|
|
7
|
+
// получить уникальный aiMessageId, иначе все копии делят один слот и ряд
|
|
8
|
+
// «расползается» при следующей генерации.
|
|
9
|
+
function reassignClonedAiMessageId(clonedData) {
|
|
10
|
+
if (clonedData?.properties?.aiMessageId) {
|
|
11
|
+
clonedData.properties.aiMessageId = `dup_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
5
15
|
export function setupClipboardFlow(core) {
|
|
6
16
|
const revitMetadataService = new RevitScreenshotMetadataService(console);
|
|
7
17
|
|
|
@@ -391,6 +401,7 @@ export function setupClipboardFlow(core) {
|
|
|
391
401
|
const clonedChild = JSON.parse(JSON.stringify(child));
|
|
392
402
|
clonedChild.properties = clonedChild.properties || {};
|
|
393
403
|
clonedChild.properties.frameId = newFrameId;
|
|
404
|
+
reassignClonedAiMessageId(clonedChild);
|
|
394
405
|
const targetPos = {
|
|
395
406
|
x: (child.position?.x || 0) + dx,
|
|
396
407
|
y: (child.position?.y || 0) + dy
|
|
@@ -431,6 +442,7 @@ export function setupClipboardFlow(core) {
|
|
|
431
442
|
type: 'object',
|
|
432
443
|
data: JSON.parse(JSON.stringify(original))
|
|
433
444
|
};
|
|
445
|
+
reassignClonedAiMessageId(core.clipboard.data);
|
|
434
446
|
try {
|
|
435
447
|
if (original.type === 'frame') {
|
|
436
448
|
core._dupTitleMap = core._dupTitleMap || new Map();
|
|
@@ -487,6 +499,7 @@ export function setupClipboardFlow(core) {
|
|
|
487
499
|
tempHandlers.set(originalId, handler);
|
|
488
500
|
core.eventBus.on(Events.Object.Pasted, handler);
|
|
489
501
|
core.clipboard = { type: 'object', data: JSON.parse(JSON.stringify(obj)) };
|
|
502
|
+
reassignClonedAiMessageId(core.clipboard.data);
|
|
490
503
|
try {
|
|
491
504
|
if (obj.type === 'frame') {
|
|
492
505
|
core._dupTitleMap = core._dupTitleMap || new Map();
|
|
@@ -152,7 +152,7 @@ function initHtmlLayersAndPanels(board) {
|
|
|
152
152
|
board.framePropertiesPanel = new FramePropertiesPanel(board.coreMoodboard.eventBus, board.canvasContainer, board.coreMoodboard);
|
|
153
153
|
board.notePropertiesPanel = new NotePropertiesPanel(board.coreMoodboard.eventBus, board.canvasContainer, board.coreMoodboard);
|
|
154
154
|
board.filePropertiesPanel = new FilePropertiesPanel(board.coreMoodboard.eventBus, board.canvasContainer, board.coreMoodboard);
|
|
155
|
-
board.imagePropertiesPanel = new ImagePropertiesPanel(board.coreMoodboard.eventBus, board.canvasContainer, board.coreMoodboard);
|
|
155
|
+
board.imagePropertiesPanel = new ImagePropertiesPanel(board.coreMoodboard.eventBus, board.canvasContainer, board.coreMoodboard, board.options.currentUser || null);
|
|
156
156
|
board.connectorPropertiesPanel = new ConnectorPropertiesPanel(board.coreMoodboard.eventBus, board.canvasContainer, board.coreMoodboard);
|
|
157
157
|
board.shapePropertiesPanel = new ShapePropertiesPanel(board.coreMoodboard.eventBus, board.canvasContainer, board.coreMoodboard);
|
|
158
158
|
board.drawingPropertiesPanel = new DrawingPropertiesPanel(board.coreMoodboard.eventBus, board.canvasContainer, board.coreMoodboard);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as PIXI from 'pixi.js';
|
|
2
|
+
import { applyRoundedMask } from '../utils/applyRoundedMask.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* ImageObject — отображение загруженного изображения как спрайт
|
|
@@ -42,6 +43,10 @@ export class ImageObject {
|
|
|
42
43
|
baseH: texH
|
|
43
44
|
}
|
|
44
45
|
};
|
|
46
|
+
const borderRadius = objectData.properties?.borderRadius;
|
|
47
|
+
if (borderRadius > 0) {
|
|
48
|
+
applyRoundedMask(this.sprite, borderRadius);
|
|
49
|
+
}
|
|
45
50
|
};
|
|
46
51
|
|
|
47
52
|
const onError = () => {
|