From df33fc10169b45706409748cffdeb84cd44cfdf9 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Mon, 22 Apr 2019 11:44:51 -0400
Subject: fixed webbox's

---
 src/client/views/nodes/WebBox.tsx | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 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 1edb4d826..1def300dc 100644
--- a/src/client/views/nodes/WebBox.tsx
+++ b/src/client/views/nodes/WebBox.tsx
@@ -2,20 +2,17 @@ import "./WebBox.scss";
 import React = require("react");
 import { WebField } from '../../../fields/WebField';
 import { FieldViewProps, FieldView } from './FieldView';
-import { FieldWaiting } from '../../../fields/Field';
+import { FieldWaiting, Opt } from '../../../fields/Field';
 import { observer } from "mobx-react";
-import { computed } from 'mobx';
+import { computed, reaction, IReactionDisposer } from 'mobx';
 import { KeyStore } from '../../../fields/KeyStore';
+import { DocumentDecorations } from "../DocumentDecorations";
 
 @observer
 export class WebBox extends React.Component<FieldViewProps> {
 
     public static LayoutString() { return FieldView.LayoutString(WebBox); }
 
-    constructor(props: FieldViewProps) {
-        super(props);
-    }
-
     @computed get html(): string { return this.props.Document.GetHtml(KeyStore.Data, ""); }
 
     _ignore = 0;
@@ -46,12 +43,14 @@ export class WebBox extends React.Component<FieldViewProps> {
                     <iframe src={path} style={{ position: "absolute", width: "100%", height: "100%" }} />}
             </div>;
 
+        let frozen = !this.props.isSelected() || DocumentDecorations.Instance._resizer;
+
         return (
             <>
                 <div className="webBox-cont"  >
                     {content}
                 </div>
-                {this.props.isSelected() ? (null) : <div onWheel={this.onPreWheel} onPointerDown={this.onPrePointer} onPointerMove={this.onPrePointer} onPointerUp={this.onPrePointer} style={{ width: "100%", height: "100%", position: "absolute" }} />}
+                {!frozen ? (null) : <div onWheel={this.onPreWheel} onPointerDown={this.onPrePointer} onPointerMove={this.onPrePointer} onPointerUp={this.onPrePointer} style={{ width: "100%", height: "100%", position: "absolute" }} />}
             </>);
     }
 }
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2


From 83d1e6e08f8642ee20aea3a1ee47e7f8f7e0a996 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Mon, 22 Apr 2019 11:45:19 -0400
Subject: from last

---
 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 1def300dc..05727f6f4 100644
--- a/src/client/views/nodes/WebBox.tsx
+++ b/src/client/views/nodes/WebBox.tsx
@@ -43,7 +43,7 @@ export class WebBox extends React.Component<FieldViewProps> {
                     <iframe src={path} style={{ position: "absolute", width: "100%", height: "100%" }} />}
             </div>;
 
-        let frozen = !this.props.isSelected() || DocumentDecorations.Instance._resizer;
+        let frozen = !this.props.isSelected() || DocumentDecorations.Instance.Resizing;
 
         return (
             <>
-- 
cgit v1.2.3-70-g09d2


From 92c3bd4102e40f2f4bfd93e10d0a4a57316614c1 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Mon, 22 Apr 2019 11:54:45 -0400
Subject: better fix

---
 src/client/util/DragManager.ts           |  1 +
 src/client/views/DocumentDecorations.tsx | 16 +++++++++-------
 src/client/views/nodes/WebBox.tsx        |  2 +-
 3 files changed, 11 insertions(+), 8 deletions(-)

(limited to 'src/client/views/nodes/WebBox.tsx')

diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts
index 46658867b..465b97981 100644
--- a/src/client/util/DragManager.ts
+++ b/src/client/util/DragManager.ts
@@ -174,6 +174,7 @@ export namespace DragManager {
         if (!dragDiv) {
             dragDiv = document.createElement("div");
             dragDiv.className = "dragManager-dragDiv";
+            dragDiv.style.pointerEvents = "none";
             DragManager.Root().appendChild(dragDiv);
         }
         MainOverlayTextBox.Instance.SetTextDoc();
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index 7d9166c86..d704b6c47 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -26,6 +26,7 @@ export const Flyout = higflyout.default;
 export class DocumentDecorations extends React.Component<{}, { value: string }> {
     static Instance: DocumentDecorations;
     private _isPointerDown = false;
+    private _resizing = "";
     private keyinput: React.RefObject<HTMLInputElement>;
     private _documents: DocumentView[] = SelectionManager.SelectedDocuments();
     private _resizeBorderWidth = 16;
@@ -44,8 +45,7 @@ export class DocumentDecorations extends React.Component<{}, { value: string }>
     @observable private _opacity = 1;
     @observable private _dragging = false;
     @observable private _iconifying = false;
-
-    @observable public Resizing = "";
+    @observable public Interacting = false;
 
 
     constructor(props: Readonly<{}>) {
@@ -141,12 +141,12 @@ export class DocumentDecorations extends React.Component<{}, { value: string }>
         dragData.yOffset = e.y - top;
         let move = SelectionManager.SelectedDocuments()[0].props.moveDocument;
         dragData.moveDocument = move;
-        this._dragging = true;
+        this.Interacting = this._dragging = true;
         document.removeEventListener("pointermove", this.onBackgroundMove);
         document.removeEventListener("pointerup", this.onBackgroundUp);
         DragManager.StartDocumentDrag(SelectionManager.SelectedDocuments().map(docView => docView.ContentDiv!), dragData, e.x, e.y, {
             handlers: {
-                dragComplete: action(() => this._dragging = false),
+                dragComplete: action(() => this.Interacting = this._dragging = false),
             },
             hideSource: true
         });
@@ -261,7 +261,8 @@ export class DocumentDecorations extends React.Component<{}, { value: string }>
         e.stopPropagation();
         if (e.button === 0) {
             this._isPointerDown = true;
-            this.Resizing = e.currentTarget.id;
+            this._resizing = e.currentTarget.id;
+            this.Interacting = true;
             document.removeEventListener("pointermove", this.onPointerMove);
             document.addEventListener("pointermove", this.onPointerMove);
             document.removeEventListener("pointerup", this.onPointerUp);
@@ -330,7 +331,7 @@ export class DocumentDecorations extends React.Component<{}, { value: string }>
 
         let dX = 0, dY = 0, dW = 0, dH = 0;
 
-        switch (this.Resizing) {
+        switch (this._resizing) {
             case "":
                 break;
             case "documentDecorations-topLeftResizer":
@@ -403,7 +404,8 @@ export class DocumentDecorations extends React.Component<{}, { value: string }>
     @action
     onPointerUp = (e: PointerEvent): void => {
         e.stopPropagation();
-        this.Resizing = "";
+        this._resizing = "";
+        this.Interacting = false;
         if (e.button === 0) {
             e.preventDefault();
             this._isPointerDown = false;
diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx
index 05727f6f4..f7f5e31e6 100644
--- a/src/client/views/nodes/WebBox.tsx
+++ b/src/client/views/nodes/WebBox.tsx
@@ -43,7 +43,7 @@ export class WebBox extends React.Component<FieldViewProps> {
                     <iframe src={path} style={{ position: "absolute", width: "100%", height: "100%" }} />}
             </div>;
 
-        let frozen = !this.props.isSelected() || DocumentDecorations.Instance.Resizing;
+        let frozen = !this.props.isSelected() || DocumentDecorations.Instance.Interacting;
 
         return (
             <>
-- 
cgit v1.2.3-70-g09d2

