Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-vectordraw
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
xblock-vectordraw
Commits
d27bd465
Unverified
Commit
d27bd465
authored
Sep 02, 2016
by
Brandon DeRosier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port "Improve touchscreen dragging"
From
https://github.com/open-craft/jsinput-vectordraw/pull/32
parent
f2bb3993
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
vectordraw/public/js/vectordraw.js
+9
-6
No files found.
vectordraw/public/js/vectordraw.js
View file @
d27bd465
...
@@ -409,12 +409,15 @@ function VectorDrawXBlock(runtime, element, init_args) {
...
@@ -409,12 +409,15 @@ function VectorDrawXBlock(runtime, element, init_args) {
return
true
;
return
true
;
};
};
VectorDraw
.
prototype
.
objectsUnderMouse
=
function
(
coords
)
{
VectorDraw
.
prototype
.
objectsUnderMouse
=
function
(){
var
filter
=
function
(
el
)
{
var
targetObjects
=
[];
return
!
(
el
instanceof
JXG
.
Image
)
&&
el
.
hasPoint
(
coords
.
scrCoords
[
1
],
coords
.
scrCoords
[
2
]);
var
highlightedObjects
=
this
.
board
.
highlightedObjects
};
var
keys
=
Object
.
keys
(
highlightedObjects
);
return
_
.
filter
(
_
.
values
(
this
.
board
.
objects
),
filter
);
for
(
var
i
=
0
;
i
<
keys
.
length
;
i
++
)
{
};
targetObjects
.
push
(
highlightedObjects
[
keys
[
i
]]
);
}
return
targetObjects
}
VectorDraw
.
prototype
.
onBoardDown
=
function
(
evt
)
{
VectorDraw
.
prototype
.
onBoardDown
=
function
(
evt
)
{
this
.
pushHistory
();
this
.
pushHistory
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment