Comments (4)
I am pretty sure it is doable because of this Stackoverflow post but unsure how much effort it woudl take ?
I don't immediately see anything in that so post that actually offers drag out of the window support :D
That aside, my original vision did include the ability to fully popout notes from the page in a separate window as well as offering an option to have the note manager open in a separate window or even phone.
I do also see that the action bar gets funky when only half the screen is used, that's also something I need to clean up.
from planarally.
Oh they gave javascript and html examples?
//Make the DIV element draggagle:
dragElement(document.getElementById("mydiv"));
function dragElement(elmnt) {
var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
if (document.getElementById(elmnt.id + "header")) {
/* if present, the header is where you move the DIV from:*/
document.getElementById(elmnt.id + "header").onmousedown = dragMouseDown;
} else {
/* otherwise, move the DIV from anywhere inside the DIV:*/
elmnt.onmousedown = dragMouseDown;
}
function dragMouseDown(e) {
e = e || window.event;
e.preventDefault();
// get the mouse cursor position at startup:
pos3 = e.clientX;
pos4 = e.clientY;
document.onmouseup = closeDragElement;
// call a function whenever the cursor moves:
document.onmousemove = elementDrag;
}
function elementDrag(e) {
e = e || window.event;
e.preventDefault();
// calculate the new cursor position:
pos1 = pos3 - e.clientX;
pos2 = pos4 - e.clientY;
pos3 = e.clientX;
pos4 = e.clientY;
// set the element's new position:
elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
}
function closeDragElement() {
/* stop moving when mouse button is released:*/
document.onmouseup = null;
document.onmousemove = null;
}
}
#mydiv {
position: absolute;
z-index: 9;
background-color: #f1f1f1;
text-align: center;
border: 1px solid #d3d3d3;
}
#mydivheader {
padding: 10px;
cursor: move;
z-index: 10;
background-color: #2196F3;
color: #fff;
}
<h1>Draggable DIV Element</h1>
<p>Click and hold the mouse button down while moving the DIV element</p>
<div id="mydiv">
<div id="mydivheader">Click here to</div>
<p>Move</p>
<p>this</p>
<p>DIV</p>
</div>
I thought they might help figure it out?
from planarally.
that's just dragging within the page. You can do that already.
What you want is dragging to another page/monitor.
from planarally.
that's just dragging within the page. You can do that already.
What you want is dragging to another page/monitor.
Yeah. Basically, it makes it easier on a multi-monitor setup.
from planarally.
Related Issues (20)
- [FEAT] A vision-blocking object should only block the area behind it, not itself HOT 13
- [FEAT] Explain the dice rolls in the log
- [FEAT] Show who rolled what in the log HOT 5
- [FEAT] Option to change the ruler units HOT 1
- [BUG] It is possible to guess the monster location in the dark by the public description HOT 1
- [BUG] PA wrongly scale assets automatically
- [ENHANCEMENT] Make Note Tags case matched.
- [FEATURE] In the sidebar, if elements have very long names, they are truncated. Add tooltip
- [BUG] Default server_config.cfg has duplicate ssl and cors configs. HOT 1
- [FEAT] Move server_config.cfg into the data directory so it can easily be included in a docker volume. HOT 1
- [BUG] Unable to draw circle shape HOT 5
- [BUG] 'Move to Back' button doesn't take effect until clicking elsewhere
- [BUG] Grid snapping resizing doesn't work when shape is rotated
- [BUG] Note icon on shape can be drawn over by its parent shape HOT 1
- [BUG] Note icon positon inconsistent between shape types HOT 1
- [BUG] Adding or removing shapes from notes not being received by clients until a refresh HOT 1
- [BUG] Floor display does not update until refresh
- [BUG] Undoing shape removal does not reattach shape to notes HOT 1
- [BUG] shape notes not consistent with templates
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from planarally.