Skip to content

Commit

Permalink
Small fix for node usage
Browse files Browse the repository at this point in the history
  • Loading branch information
agviegas committed Aug 9, 2023
1 parent 7981a5d commit 1897d2e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openbim-components",
"version": "1.0.0-alpha.63",
"version": "1.0.0-alpha.64",
"main": "index.js",
"author": "harry collin, antonio gonzalez viegas",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions resources/openbim-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -12157,6 +12157,13 @@ class FloatingWindow extends SimpleUIComponent {
};
}
setMovableListeners() {
// For node.js
try {
this._components.renderer;
}
catch (_e) {
return;
}
let isMouseDown = false;
let offsetX = 0;
let offsetY = 0;
Expand Down
7 changes: 7 additions & 0 deletions src/ui/FloatingWindow/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ export class FloatingWindow extends SimpleUIComponent<HTMLDivElement> {
}

private setMovableListeners() {
// For node.js
try {
this._components.renderer;
} catch (_e) {
return;
}

let isMouseDown = false;
let offsetX = 0;
let offsetY = 0;
Expand Down

0 comments on commit 1897d2e

Please sign in to comment.