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:
Daniel Maya 2019-06-24 18:52:58 +02:00
commit 52f762bd5a
7 changed files with 50 additions and 24 deletions
pandora_console/include/visual-console-client
visual_console_client/src

View File

@ -13,16 +13,16 @@
display: flex;
-webkit-box-orient: initial;
-webkit-box-direction: initial;
-ms-flex-direction: initial;
flex-direction: initial;
-ms-flex-direction: initial;
flex-direction: initial;
justify-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
}
.visual-console-item.is-editing {
@ -60,17 +60,17 @@
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-pack: center;
justify-content: center;
justify-items: center;
-ms-flex-line-pack: center;
align-content: center;
align-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-ms-flex-align: center;
align-items: center;
}
.visual-console-item .digital-clock > span {
@ -100,17 +100,18 @@
.visual-console-item .analogic-clock .hour-hand {
-webkit-animation: rotate-hour 43200s infinite linear;
animation: rotate-hour 43200s infinite linear;
animation: rotate-hour 43200s infinite linear;
}
.visual-console-item .analogic-clock .minute-hand {
-webkit-animation: rotate-minute 3600s infinite linear;
animation: rotate-minute 3600s infinite linear;
animation: rotate-minute 3600s infinite linear;
}
.visual-console-item .analogic-clock .second-hand {
-webkit-animation: rotate-second 60s infinite linear;
animation: rotate-second 60s infinite linear;
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

View File

@ -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;

View File

@ -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.

View File

@ -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.

View File

@ -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)