aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/views/Main.tsx15
-rw-r--r--src/client/views/collections/CollectionFreeFormView.tsx2
2 files changed, 9 insertions, 8 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx
index 5a0fb23bd..2f4264ad9 100644
--- a/src/client/views/Main.tsx
+++ b/src/client/views/Main.tsx
@@ -49,19 +49,14 @@ export class Main extends React.Component {
initAuthenticationRouters = () => {
// Load the user's active workspace, or create a new one if initial session after signup
- request.get(window.location.origin + "/getActiveWorkspaceId", (error, response, body) => {
+ request.get(this.contextualize("getActiveWorkspaceId"), (error, response, body) => {
this.requestWorkspace(body ? body : this.getNewWorkspace());
});
}
getNewWorkspace = (): string => {
let newId = Utils.GenerateGuid();
- const here = window.location.origin;
- request.post(here + "/addWorkspaceId", {
- body: { target: newId },
- json: true
- })
- request.post(here + "/setActiveWorkspaceId", {
+ request.post(this.contextualize("addWorkspaceId"), {
body: { target: newId },
json: true
})
@@ -70,6 +65,10 @@ export class Main extends React.Component {
@action
requestWorkspace = (activeWorkspaceId: string) => {
+ request.post(this.contextualize("setActiveWorkspaceId"), {
+ body: { target: activeWorkspaceId },
+ json: true
+ })
Documents.initProtos(activeWorkspaceId, this.prepareWorkspace);
}
@@ -99,6 +98,8 @@ export class Main extends React.Component {
}
}
+ contextualize = (extension: string) => window.location.origin + "/" + extension;
+
render() {
let imgRef = React.createRef<HTMLDivElement>();
let webRef = React.createRef<HTMLDivElement>();
diff --git a/src/client/views/collections/CollectionFreeFormView.tsx b/src/client/views/collections/CollectionFreeFormView.tsx
index 5e9dcd5d5..43f5fe6d6 100644
--- a/src/client/views/collections/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/CollectionFreeFormView.tsx
@@ -277,7 +277,7 @@ export class CollectionFreeFormView extends CollectionViewBase {
const pany: number = -this.props.Document.GetNumber(KeyStore.PanY, 0);
// const panx: number = this.props.Document.GetNumber(KeyStore.PanX, 0) + this.centeringShiftX;
// const pany: number = this.props.Document.GetNumber(KeyStore.PanY, 0) + this.centeringShiftY;
- console.log("center:", this.getLocalTransform().transformPoint(this.centeringShiftX, this.centeringShiftY));
+ // console.log("center:", this.getLocalTransform().transformPoint(this.centeringShiftX, this.centeringShiftY));
return (
<div className="collectionfreeformview-container"