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
45f3fe7e
Commit
45f3fe7e
authored
Feb 05, 2012
by
cjt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix pop-up window positioning
parent
332f4986
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
js/schematic.js
+13
-6
No files found.
js/schematic.js
View file @
45f3fe7e
...
...
@@ -194,7 +194,6 @@ schematic = (function() {
this
.
canvas
.
style
.
borderStyle
=
'solid'
;
this
.
canvas
.
style
.
borderWidth
=
'1px'
;
this
.
canvas
.
style
.
borderColor
=
grid_style
;
//this.canvas.style.position = 'absolute';
this
.
canvas
.
style
.
outline
=
'none'
;
}
...
...
@@ -274,6 +273,9 @@ schematic = (function() {
tr
=
document
.
createElement
(
'tr'
);
table
.
appendChild
(
tr
);
td
=
document
.
createElement
(
'td'
);
td
.
style
.
position
=
'relative'
;
// so we can position subwindows
td
.
style
.
left
=
'0'
;
td
.
style
.
top
=
'0'
;
tr
.
appendChild
(
td
);
td
.
appendChild
(
this
.
canvas
);
td
=
document
.
createElement
(
'td'
);
...
...
@@ -1233,6 +1235,7 @@ schematic = (function() {
// just redraw dynamic components
sch
.
redraw
();
//sch.message(sch.canvas.page_x + ',' + sch.canvas.page_y + ';' + sch.canvas.mouse_x + ',' + sch.canvas.mouse_y + ';' + sch.cursor_x + ',' + sch.cursor_y);
return
false
;
}
...
...
@@ -1474,9 +1477,9 @@ schematic = (function() {
win
.
appendChild
(
content
);
content
.
win
=
win
;
// so content can contact us
// compute location
in top-level div
win
.
left
=
this
.
canvas
.
pag
e_x
;
win
.
top
=
this
.
canvas
.
pag
e_y
;
// compute location
relative to canvas
win
.
left
=
this
.
canvas
.
mous
e_x
;
win
.
top
=
this
.
canvas
.
mous
e_y
;
// add to DOM
win
.
style
.
background
=
'white'
;
...
...
@@ -1486,7 +1489,8 @@ schematic = (function() {
win
.
style
.
top
=
win
.
top
+
'px'
;
win
.
style
.
border
=
'2px solid'
;
this
.
input
.
parentNode
.
insertBefore
(
win
,
this
.
input
.
nextSibling
);
this
.
canvas
.
parentNode
.
insertBefore
(
win
,
this
.
canvas
);
//this.input.parentNode.insertBefore(win,this.input.nextSibling);
}
// close the window
...
...
@@ -1631,7 +1635,10 @@ schematic = (function() {
if
(
!
event
)
event
=
window
.
event
;
var
tool
=
(
window
.
event
)
?
event
.
srcElement
:
event
.
target
;
if
(
tool
.
enabled
)
tool
.
callback
.
call
(
tool
.
sch
);
if
(
tool
.
enabled
)
{
tool
.
sch
.
canvas
.
relMouseCoords
(
event
);
// so we can position pop-up window correctly
tool
.
callback
.
call
(
tool
.
sch
);
}
}
cut_icon
=
'data:image/gif;base64,R0lGODlhEAAQALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD//////yH5BAEAAAcALAAAAAAQABAAAAQu8MhJqz1g5qs7lxv2gRkQfuWomarXEgDRHjJhf3YtyRav0xcfcFgR0nhB5OwTAQA7'
;
...
...
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