From a134dab9a458efcc8b4bd60489483e68f9332397 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 12 Jan 2021 17:50:25 -0500 Subject: fixed layout of audioBox markers --- src/client/views/nodes/WebBox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client/views/nodes/WebBox.tsx') diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index 8e824a447..7fb14b0cc 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -689,7 +689,7 @@ export class WebBox extends ViewBoxAnnotatableComponent - Date: Mon, 18 Jan 2021 11:12:01 -0500 Subject: fixed marquee dragging in webBox to pick correlate with cursor again. --- src/client/views/nodes/WebBox.tsx | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/client/views/nodes/WebBox.tsx') diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index 7fb14b0cc..876243533 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -484,13 +484,14 @@ export class WebBox extends ViewBoxAnnotatableComponent => { + const scale = this.props.scaling?.() || 1; if (this._savedAnnotations.size() === 0) return undefined; const anno = this._savedAnnotations.values()[0][0]; const annoDoc = Docs.Create.FreeformDocument([], { backgroundColor: color, annotationOn: this.props.Document, title: "Annotation on " + this.Document.title }); - if (anno.style.left) annoDoc.x = parseInt(anno.style.left); - if (anno.style.top) annoDoc.y = NumCast(this.layoutDoc._scrollTop) + parseInt(anno.style.top); - if (anno.style.height) annoDoc._height = parseInt(anno.style.height); - if (anno.style.width) annoDoc._width = parseInt(anno.style.width); + if (anno.style.left) annoDoc.x = parseInt(anno.style.left) / scale; + if (anno.style.top) annoDoc.y = (NumCast(this.layoutDoc._scrollTop) + parseInt(anno.style.top)) / scale; + if (anno.style.height) annoDoc._height = parseInt(anno.style.height) / scale; + if (anno.style.width) annoDoc._width = parseInt(anno.style.width) / scale; anno.remove(); this._savedAnnotations.clear(); return annoDoc; @@ -575,8 +576,8 @@ export class WebBox extends ViewBoxAnnotatableComponent - {this.props.isSelected() ? this.editToggleBtn() : null} ); } -- cgit v1.2.3-70-g09d2 From c94a8d93ea7373af54355b5c47bf14a021cf4563 Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 18 Jan 2021 11:29:43 -0500 Subject: fixed creating right margins for WebBox's --- src/client/views/nodes/WebBox.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/client/views/nodes/WebBox.tsx') diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index 876243533..4c4f3f15a 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -458,7 +458,7 @@ export class WebBox extends ViewBoxAnnotatableComponent