Compare commits
5 Commits
1cf84762d3
...
149254ba95
Author | SHA1 | Date |
---|---|---|
Bea | 149254ba95 | |
Bea | 40808bf104 | |
Bea | cecbdc425e | |
Bea | a6d4577c46 | |
Bea | 128b72948c |
|
@ -59,3 +59,6 @@ typings/
|
|||
|
||||
/public/uploads
|
||||
/package-lock.json
|
||||
|
||||
# WebStorm config files
|
||||
/.idea/
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/Whiteboard.iml" filepath="$PROJECT_DIR$/.idea/Whiteboard.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,7 +1,8 @@
|
|||
body {
|
||||
position: relative;
|
||||
margin: 0px;
|
||||
height: calc(var(--vh, 1vh) * 100);
|
||||
/* height: calc(var(--vh, 1vh) * 100);*/
|
||||
height: 10000px;
|
||||
width: 100%;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
|
|
@ -38,11 +38,8 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<!---Whiteboard container -!-->
|
||||
<div id="whiteboardContainer"></div>
|
||||
|
||||
<!---Toolbar -!-->
|
||||
<div id="toolbar" style="position: absolute; top: 10px; left: 10px;">
|
||||
<div id="toolbar" style="position: -webkit-sticky; position: sticky; top: 10px; left: 10px; z-index: 1;">
|
||||
<div class="btn-group">
|
||||
<button id="whiteboardTrashBtn" title="Clear the whiteboard" type="button" class="whiteboardBtn">
|
||||
<i class="fa fa-trash"></i>
|
||||
|
@ -158,6 +155,11 @@
|
|||
<i id="maxBtn" style="position:relative; left:-5px; display: none;" class="fas fa-angle-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!---Whiteboard container -!-->
|
||||
<div id="whiteboardContainer" style="z-index: 0;"></div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -56,6 +56,11 @@ signaling_socket.on('connect', function () {
|
|||
whiteboard.updateSmallestScreenResolution(widthHeight["w"], widthHeight["h"]);
|
||||
});
|
||||
|
||||
signaling_socket.on('updateBiggestScreenResolution', function (widthHeight) {
|
||||
//whiteboard.updateSmallestScreenResolution(widthHeight["w"], widthHeight["h"]);
|
||||
// todo: implement biggest resolution check & update
|
||||
});
|
||||
|
||||
signaling_socket.emit('joinWhiteboard', { wid: whiteboardId, at: accessToken, windowWidthHeight: { w: $(window).width(), h: $(window).height() } });
|
||||
});
|
||||
|
||||
|
|
|
@ -214,7 +214,6 @@ var whiteboard = {
|
|||
return;
|
||||
}
|
||||
|
||||
console.info("eoff: " + e.offsetY); console.info("else:" + (e.pageY - $(e.target).offset().top));
|
||||
_this.sendFunction({
|
||||
"t": "cursor",
|
||||
"event": "move",
|
||||
|
@ -250,8 +249,6 @@ var whiteboard = {
|
|||
_this.ctx.globalCompositeOperation = _this.oldGCO;
|
||||
var currX = (loc.offsetX || loc.pageX - $(e.target).offset().left);
|
||||
var currY = (loc.offsetY || loc.pageY - $(e.target).offset().top);
|
||||
var els = loc.pageY - $(e.target).offset().top;
|
||||
console.info("eoff: " + loc.offsetY); console.info("else: " + els);
|
||||
if (!currX || !currY) {
|
||||
currX = _this.latestTouchCoods[0];
|
||||
currY = _this.latestTouchCoods[1];
|
||||
|
@ -430,19 +427,7 @@ var whiteboard = {
|
|||
var currX = loc.offsetX || loc.pageX - $(e.target).offset().left;
|
||||
var currY = loc.offsetY || loc.pageY - $(e.target).offset().top;
|
||||
|
||||
/*console.log("curr y:" + loc.currY);
|
||||
console.log("offset y:" + loc.offsetY);
|
||||
console.log("page y:" + loc.pageY);
|
||||
|
||||
console.log("current y: " + currY);*/
|
||||
|
||||
window.requestAnimationFrame(function () {
|
||||
if ((!currX || !currY) && e.touches && e.touches[0]) {
|
||||
var touche = e.touches[0];
|
||||
currX = touche.clientX - $(_this.mouseOverlay).offset().left;
|
||||
currY = touche.clientY - $(_this.mouseOverlay).offset().top;
|
||||
//console.log("current y new: " + currY);
|
||||
}
|
||||
_this.latestTouchCoods = [currX, currY];
|
||||
|
||||
if (_this.drawFlag) {
|
||||
|
|
Loading…
Reference in New Issue