Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
418d6fa9
Commit
418d6fa9
authored
Dec 11, 2013
by
polesye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BLD-413: Add rounding of coordinates.
parent
d5bff2e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
common/lib/xmodule/xmodule/js/src/capa/imageinput.js
+3
-3
No files found.
common/lib/xmodule/xmodule/js/src/capa/imageinput.js
View file @
418d6fa9
...
...
@@ -11,10 +11,10 @@ window.image_input_click = function(id,event){
iidiv
=
document
.
getElementById
(
"imageinput_"
+
id
);
pos_x
=
event
.
offsetX
?(
event
.
offsetX
):
event
.
pageX
-
iidiv
.
offsetLeft
;
pos_y
=
event
.
offsetY
?(
event
.
offsetY
):
event
.
pageY
-
iidiv
.
offsetTop
;
result
=
"["
+
pos_x
+
","
+
pos_y
+
"]"
;
result
=
"["
+
Math
.
round
(
pos_x
)
+
","
+
Math
.
round
(
pos_y
)
+
"]"
;
cx
=
(
pos_x
-
15
)
+
"px"
;
cy
=
(
pos_y
-
15
)
+
"px"
;
// alert(result);
cy
=
(
pos_y
-
15
)
+
"px"
;
document
.
getElementById
(
"cross_"
+
id
).
style
.
left
=
cx
;
document
.
getElementById
(
"cross_"
+
id
).
style
.
top
=
cy
;
document
.
getElementById
(
"cross_"
+
id
).
style
.
visibility
=
"visible"
;
...
...
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