mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Merge branch 'ent-4258-visual-console-movement-redimension-mode' of https://brutus.artica.lan:8081/artica/pandorafms into ent-4258-visual-console-movement-redimension-mode
This commit is contained in:
commit
52f762bd5a
@ -113,4 +113,5 @@
|
||||
animation: rotate-second 60s infinite linear;
|
||||
}
|
||||
|
||||
|
||||
/*# sourceMappingURL=vc.main.css.map*/
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -508,6 +508,15 @@ abstract class VisualConsoleItem<Props extends ItemProps> {
|
||||
* @param newProps
|
||||
*/
|
||||
public set meta(newMetadata: ItemMeta) {
|
||||
this.setMeta(newMetadata);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clasic and protected version of the setter of the `meta` property.
|
||||
* Useful to override it from children classes.
|
||||
* @param newProps
|
||||
*/
|
||||
protected setMeta(newMetadata: ItemMeta) {
|
||||
const prevMetadata = this._metadata;
|
||||
// Update the internal meta.
|
||||
this._metadata = newMetadata;
|
||||
|
@ -53,6 +53,10 @@ export default class ColorCloud extends Item<ColorCloudProps> {
|
||||
return container;
|
||||
}
|
||||
|
||||
protected resizeElement(width: number): void {
|
||||
super.resizeElement(width, width);
|
||||
}
|
||||
|
||||
public createSvgElement(): SVGSVGElement {
|
||||
const gradientId = `grad_${this.props.id}`;
|
||||
// SVG container.
|
||||
|
@ -83,10 +83,26 @@ export default class Line extends Item<LineProps> {
|
||||
...props,
|
||||
...Line.extractBoxSizeAndPosition(props)
|
||||
},
|
||||
meta
|
||||
{
|
||||
...meta,
|
||||
editMode: false
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clasic and protected version of the setter of the `meta` property.
|
||||
* Useful to override it from children classes.
|
||||
* @param newProps
|
||||
* @override Item.setMeta
|
||||
*/
|
||||
public setMeta(newMetadata: ItemMeta) {
|
||||
super.setMeta({
|
||||
...newMetadata,
|
||||
editMode: false
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @override
|
||||
* To create the item's DOM representation.
|
||||
|
@ -652,10 +652,6 @@ export function addResizementListener(
|
||||
|
||||
if (width === lastWidth && height === lastHeight) return;
|
||||
|
||||
console.log(
|
||||
width - lastWidth,
|
||||
e.pageX - elementLeft + (lastWidth - mouseElementOffsetX)
|
||||
);
|
||||
if (
|
||||
width < lastWidth &&
|
||||
e.pageX > elementLeft + (lastWidth - mouseElementOffsetX)
|
||||
|
Loading…
x
Reference in New Issue
Block a user