allow pan movement in read only mode
more start log
This commit is contained in:
parent
3a4f0e8bc2
commit
8b643761c0
@ -3,7 +3,6 @@ import WebpackDevServer from "webpack-dev-server";
|
|||||||
import config from "../config/webpack.dev.js";
|
import config from "../config/webpack.dev.js";
|
||||||
|
|
||||||
const devServerConfig = {
|
const devServerConfig = {
|
||||||
hot: true,
|
|
||||||
proxy: {
|
proxy: {
|
||||||
// proxies for the backend
|
// proxies for the backend
|
||||||
"/api": "http://localhost:3000",
|
"/api": "http://localhost:3000",
|
||||||
@ -15,12 +14,14 @@ const devServerConfig = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function startFrontendDevServer(port, resolve) {
|
export default async function startFrontendDevServer(port, resolve) {
|
||||||
new WebpackDevServer(webpack(config), devServerConfig).start(port, (err) => {
|
resolve(1);
|
||||||
|
await new WebpackDevServer(webpack(config), devServerConfig).start(port, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
console.log("Listening on port " + port);
|
|
||||||
});
|
});
|
||||||
resolve(1);
|
console.log(
|
||||||
|
"\n\n-------Successfully started dev server on http://localhost:8080-----------\n\n"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -46,10 +46,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn-group whiteboard-edit-group">
|
<div class="btn-group">
|
||||||
<button tool="mouse" title="Take the mouse" type="button" class="whiteboard-tool">
|
|
||||||
<i class="fa fa-mouse-pointer"></i>
|
|
||||||
</button>
|
|
||||||
<button
|
<button
|
||||||
tool="hand"
|
tool="hand"
|
||||||
title="pan the whiteboard"
|
title="pan the whiteboard"
|
||||||
@ -58,6 +55,12 @@
|
|||||||
>
|
>
|
||||||
<i class="fa fa-hand-paper" aria-hidden="true"></i>
|
<i class="fa fa-hand-paper" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group whiteboard-edit-group">
|
||||||
|
<button tool="mouse" title="Take the mouse" type="button" class="whiteboard-tool">
|
||||||
|
<i class="fa fa-mouse-pointer"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
style="padding-bottom: 11px"
|
style="padding-bottom: 11px"
|
||||||
|
@ -32,6 +32,8 @@ class ReadOnlyService {
|
|||||||
// other tools
|
// other tools
|
||||||
$(".whiteboard-tool[tool=mouse]").click();
|
$(".whiteboard-tool[tool=mouse]").click();
|
||||||
$(".whiteboard-tool").prop("disabled", true);
|
$(".whiteboard-tool").prop("disabled", true);
|
||||||
|
$(".whiteboard-tool[tool='hand']").prop("disabled", false);
|
||||||
|
|
||||||
$(".whiteboard-edit-group > button").prop("disabled", true);
|
$(".whiteboard-edit-group > button").prop("disabled", true);
|
||||||
$(".whiteboard-edit-group").addClass("group-disabled");
|
$(".whiteboard-edit-group").addClass("group-disabled");
|
||||||
$("#whiteboardUnlockBtn").hide();
|
$("#whiteboardUnlockBtn").hide();
|
||||||
|
@ -137,7 +137,7 @@ const whiteboard = {
|
|||||||
if (_this.imgDragActive || _this.drawFlag) {
|
if (_this.imgDragActive || _this.drawFlag) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ReadOnlyService.readOnlyActive) return;
|
if (ReadOnlyService.readOnlyActive && _this.tool !== "hand") return;
|
||||||
|
|
||||||
_this.drawFlag = true;
|
_this.drawFlag = true;
|
||||||
|
|
||||||
@ -266,7 +266,7 @@ const whiteboard = {
|
|||||||
if (_this.imgDragActive) {
|
if (_this.imgDragActive) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ReadOnlyService.readOnlyActive) return;
|
if (ReadOnlyService.readOnlyActive && _this.tool !== "hand") return;
|
||||||
_this.drawFlag = false;
|
_this.drawFlag = false;
|
||||||
_this.ctx.globalCompositeOperation = _this.oldGCO;
|
_this.ctx.globalCompositeOperation = _this.oldGCO;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user