Commit e9d9978f authored by r03ert0's avatar r03ert0

fix broken links to svg icons

parent 0c035c6d
/* global AtlasMakerWidget $ */ /* global AtlasMakerWidget $ */
/*! AtlasMaker: Painting commands */ /*! AtlasMaker: Painting commands */
import showIcon from "./svg/show.svg";
/** /**
* @page AtlasMaker: Painting commands * @page AtlasMaker: Painting commands
*/ */
...@@ -28,13 +30,15 @@ export var AtlasMakerPaint = { ...@@ -28,13 +30,15 @@ export var AtlasMakerPaint = {
break; break;
case 'm': case 'm':
if(!usr.pointer) { if(!usr.pointer) {
usr.pointer = $([ const div = document.createElement("div");
'<div style="display:inline-block;height:20px;margin-left:-10px;margin-top:-10px;position:absolute;color:white">', const icon = new Image();
'<img src="' + me.hostname + '/img/show.svg" height="100%"/>', icon.src = showIcon;
((usr.username === 'Anonymous')?u:usr.username), icon.style.cssText = "height:100%";
'</div>' div.appendChild(icon);
].join('')); div.style.cssText = "display:inline-block;height:20px;margin-left:-10px;margin-top:-10px;position:absolute;color:white";
$("#resizable").append(usr.pointer); div.innerHTML += ((usr.username === 'Anonymous')?u:usr.username);
usr.pointer = $(div);
$("#resizable").append(usr.pointer); // document.getElementById("resizable").appendChild(div);
} }
usr.pointer.css({left:x*$("#resizable").width()/me.brain_W, top:y*$("#resizable").height()/me.brain_H}); usr.pointer.css({left:x*$("#resizable").width()/me.brain_W, top:y*$("#resizable").height()/me.brain_H});
break; break;
...@@ -80,13 +84,23 @@ export var AtlasMakerPaint = { ...@@ -80,13 +84,23 @@ export var AtlasMakerPaint = {
} }
} else { } else {
if(!usr.pointer) { if(!usr.pointer) {
usr.pointer = $([ const div = document.createElement("div");
'<div style="display:inline-block;height:20px;margin-left:-10px;margin-top:-10px;position:absolute;color:white">', const icon = new Image();
'<img src="' + me.hostname + '/img/show.svg" height="100%"/>', icon.src = showIcon;
((usr.username === 'Anonymous')?u:usr.username), icon.style.cssText = "height:100%";
'</div>' div.appendChild(icon);
].join('')); div.style.cssText = "display:inline-block;height:20px;margin-left:-10px;margin-top:-10px;position:absolute;color:white";
$("#resizable").append(usr.pointer); div.innerHTML += ((usr.username === 'Anonymous')?u:usr.username);
usr.pointer = $(div);
$("#resizable").append(usr.pointer); // document.getElementById("resizable").appendChild(div);
// usr.pointer = $([
// '<div style="display:inline-block;height:20px;margin-left:-10px;margin-top:-10px;position:absolute;color:white">',
// '<img src="' + me.hostname + './svg/show.svg" height="100%"/>',
// ((usr.username === 'Anonymous')?u:usr.username),
// '</div>'
// ].join(''));
// $("#resizable").append(usr.pointer);
} }
usr.pointer.css({left:x*$("#resizable").width()/me.brain_W, top:y*$("#resizable").height()/me.brain_H}); usr.pointer.css({left:x*$("#resizable").width()/me.brain_W, top:y*$("#resizable").height()/me.brain_H});
} }
......
<div id='tools-side' style='display:block'> <div id='tools-side' style='display:block'>
<div id='tools-minimized'> <div id='tools-minimized'>
<div> <div>
<img style='width:28px;position:absolute;top:10px;left:10px' src='/img/bars.svg' /> <img style='width:28px;position:absolute;top:10px;left:10px' src='./img/bars.svg' />
</div> </div>
</div> </div>
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
<div id='headerBlock' style='flex:0 1 28px;background:#333'> <div id='headerBlock' style='flex:0 1 28px;background:#333'>
<div style='display:flex'> <div style='display:flex'>
<div style='flex:0 0 28px'><div id='display-minimize' title='Minimize toolbar' class='a push noBorder'><img class='icon' src='/img/times-circle.svg' /></div></div> <div style='flex:0 0 28px'><div id='display-minimize' title='Minimize toolbar' class='a push noBorder'><img class='icon' src='./img/times-circle.svg' /></div></div>
<div style='flex:1 1 auto'></div> <div style='flex:1 1 auto'></div>
<div style='flex:0 0 28px'><div id='display-left' title='Display to the left' class='a push noBorder'><img class='icon' src='/img/caret-square-o-left.svg' /></div></div> <div style='flex:0 0 28px'><div id='display-left' title='Display to the left' class='a push noBorder'><img class='icon' src='./img/caret-square-o-left.svg' /></div></div>
<div style='flex:0 0 28px'><div id='display-right' title='Display to the right' class='a push noBorder'><img class='icon' src='/img/caret-square-o-right.svg' /></div></div> <div style='flex:0 0 28px'><div id='display-right' title='Display to the right' class='a push noBorder'><img class='icon' src='./img/caret-square-o-right.svg' /></div></div>
</div> </div>
</div> </div>
...@@ -52,17 +52,17 @@ ...@@ -52,17 +52,17 @@
<div style='flex:1 0 150px;width:50px'> <div style='flex:1 0 150px;width:50px'>
<div style='display:flex'> <div style='display:flex'>
<div style='flex:1'><div id='fullscreen' title='Full screen' class='a toggle'><img class='icon' src='/img/fullscreen.svg' /></div></div> <div style='flex:1'><div id='fullscreen' title='Full screen' class='a toggle'><img class='icon' src='./img/fullscreen.svg' /></div></div>
<div style='flex:1'><div id='3drender' title='3D render' class='a push'><img class='icon' src='/img/3drender.svg' /></div></div> <div style='flex:1'><div id='3drender' title='3D render' class='a push'><img class='icon' src='./img/3drender.svg' /></div></div>
<div style='flex:1'><div id='link' title='Link' class='a push'><img class='icon' src='/img/link.svg' /></div></div> <div style='flex:1'><div id='link' title='Link' class='a push'><img class='icon' src='./img/link.svg' /></div></div>
</div> </div>
</div> </div>
<div style='flex:1 0 150px;width:50px'> <div style='flex:1 0 150px;width:50px'>
<div id='paintTool' style='display:flex' class='chose'> <div id='paintTool' style='display:flex' class='chose'>
<div style='flex:1'><div title='Show' class='a pressed'><img class='icon' src='/img/show.svg' /></div></div> <div style='flex:1'><div title='Show' class='a pressed'><img class='icon' src='./img/show.svg' /></div></div>
<div style='flex:1'><div title='Adjust' class='a'><img class='icon' src='/img/adjust.svg' /></div></div> <div style='flex:1'><div title='Adjust' class='a'><img class='icon' src='./img/adjust.svg' /></div></div>
<div style='flex:1'><div title='Eyedrop' class='a'><img class='icon' src='/img/eyedropper.svg' /></div></div> <div style='flex:1'><div title='Eyedrop' class='a'><img class='icon' src='./img/eyedropper.svg' /></div></div>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment