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
6f425814
Commit
6f425814
authored
Oct 21, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1392 from edx/db/attach-image_input_click-to-window
Attach image_input_click function to window object
parents
0be9daf9
c7dcb0bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
common/lib/xmodule/xmodule/js/src/capa/imageinput.js
+3
-5
No files found.
common/lib/xmodule/xmodule/js/src/capa/imageinput.js
View file @
6f425814
/////////////////////////////////////////////////////////////////////////////
//
// Simple image input
// Simple image input
//
////////////////////////////////////////////////////////////////////////////////
// click on image, return coordinates
// put a dot at location of click, on imag
// window.image_input_click = function(id,event){
function
image_input_click
(
id
,
event
){
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
;
...
...
@@ -21,4 +19,4 @@ function image_input_click(id,event){
document
.
getElementById
(
"cross_"
+
id
).
style
.
top
=
cy
;
document
.
getElementById
(
"cross_"
+
id
).
style
.
visibility
=
"visible"
;
document
.
getElementById
(
"input_"
+
id
).
value
=
result
;
}
}
;
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