diff --git a/src/index.html b/src/index.html index fe75bc7..5ee8c33 100644 --- a/src/index.html +++ b/src/index.html @@ -14,22 +14,28 @@
- - -
+ + @@ -96,14 +102,14 @@
-
'); } }, + setViewOnly: function(what) { + var _this = this; + _this.viewOnly = what; + + if (what === true){ + $(".whiteboardTool[tool=mouse]").click(); // reset tool to prevent use of text + $(".whiteboardTool").prop("disabled", true); + $(".whiteboardEditBtn").prop("disabled", true); + $("#whiteboardUnlockBtn").hide(); + $("#whiteboardLockBtn").show(); + + } else { + $(".whiteboardTool").prop("disabled", false); + $(".whiteboardEditBtn").prop("disabled", false); + $("#whiteboardUnlockBtn").show(); + $("#whiteboardLockBtn").hide(); + } + }, handleEventsAndData: function (content, isNewData, doneCallback) { var _this = this; var tool = content["t"]; @@ -1029,4 +1057,4 @@ function lanczosInterpolate(xm1, ym1, x0, y0, x1, y1, x2, y2, a) { return [cm1 * xm1 + c0 * x0 + c1 * x1 + c2 * x2, cm1 * ym1 + c0 * y0 + c1 * y1 + c2 * y2]; } -export default whiteboard; \ No newline at end of file +export default whiteboard;