fix some errors/better dragging + evaluate
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
This commit is contained in:
parent
a47fc3ee25
commit
61da4b9d58
2 changed files with 7 additions and 7 deletions
|
@ -306,6 +306,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Configuration -->
|
||||||
|
<script src="js/global.js" type="text/javascript"></script>
|
||||||
|
<script src="js/config.js" type="text/javascript"></script>
|
||||||
|
|
||||||
<!-- Base Libs -->
|
<!-- Base Libs -->
|
||||||
<script src="js/lib/util.js" type="text/javascript"></script>
|
<script src="js/lib/util.js" type="text/javascript"></script>
|
||||||
<script src="js/lib/events.js" type="text/javascript"></script>
|
<script src="js/lib/events.js" type="text/javascript"></script>
|
||||||
|
@ -320,11 +324,7 @@
|
||||||
src="js/initalize/layers.populate.js"
|
src="js/initalize/layers.populate.js"
|
||||||
type="text/javascript"></script>
|
type="text/javascript"></script>
|
||||||
|
|
||||||
<!-- Configuration -->
|
|
||||||
<script src="js/config.js" type="text/javascript"></script>
|
|
||||||
|
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<script src="js/global.js" type="text/javascript"></script>
|
|
||||||
<script src="js/prompt.js" type="text/javascript"></script>
|
<script src="js/prompt.js" type="text/javascript"></script>
|
||||||
<script src="js/index.js" type="text/javascript"></script>
|
<script src="js/index.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
|
|
@ -220,6 +220,7 @@ window.addEventListener(
|
||||||
const key = buttons[evn.button];
|
const key = buttons[evn.button];
|
||||||
if (
|
if (
|
||||||
(!target || target === evn.target) &&
|
(!target || target === evn.target) &&
|
||||||
|
mouse.coords[name].dragging[key] &&
|
||||||
!mouse.coords[name].dragging[key].drag &&
|
!mouse.coords[name].dragging[key].drag &&
|
||||||
key
|
key
|
||||||
) {
|
) {
|
||||||
|
@ -273,13 +274,12 @@ window.addEventListener(
|
||||||
(evn) => {
|
(evn) => {
|
||||||
const time = performance.now();
|
const time = performance.now();
|
||||||
|
|
||||||
mouse._contexts.forEach(({target, name, buttons, validate}) => {
|
mouse._contexts.forEach(({target, name, buttons}) => {
|
||||||
const key = buttons[evn.button];
|
const key = buttons[evn.button];
|
||||||
if (
|
if (
|
||||||
(!target || target === evn.target) &&
|
(!target || target === evn.target) &&
|
||||||
key &&
|
key &&
|
||||||
mouse.coords[name].dragging[key] &&
|
mouse.coords[name].dragging[key]
|
||||||
(!validate || validate(evn))
|
|
||||||
) {
|
) {
|
||||||
const start = {
|
const start = {
|
||||||
x: mouse.coords[name].dragging[key].x,
|
x: mouse.coords[name].dragging[key].x,
|
||||||
|
|
Loading…
Reference in a new issue