Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
b24e0d06
Commit
b24e0d06
authored
Dec 01, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Graph Editor: Make it easier to use another element than #main
parent
01ea6102
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
dream/platform/src/jsplumb/jsplumb.js
dream/platform/src/jsplumb/jsplumb.js
+5
-5
No files found.
dream/platform/src/jsplumb/jsplumb.js
View file @
b24e0d06
...
@@ -150,8 +150,8 @@
...
@@ -150,8 +150,8 @@
function
convertToAbsolutePosition
(
gadget
,
x
,
y
)
{
function
convertToAbsolutePosition
(
gadget
,
x
,
y
)
{
var
zoom_level
=
gadget
.
props
.
zoom_level
*
1.1111
,
var
zoom_level
=
gadget
.
props
.
zoom_level
*
1.1111
,
canvas_size_x
=
$
(
gadget
.
props
.
element
).
find
(
'
#main
'
).
width
(),
canvas_size_x
=
$
(
gadget
.
props
.
main
).
width
(),
canvas_size_y
=
$
(
gadget
.
props
.
element
).
find
(
'
#main
'
).
height
(),
canvas_size_y
=
$
(
gadget
.
props
.
main
).
height
(),
size_x
=
$
(
gadget
.
props
.
element
).
find
(
'
.dummy_window
'
).
width
()
*
size_x
=
$
(
gadget
.
props
.
element
).
find
(
'
.dummy_window
'
).
width
()
*
zoom_level
,
zoom_level
,
size_y
=
$
(
gadget
.
props
.
element
).
find
(
'
.dummy_window
'
).
height
()
*
size_y
=
$
(
gadget
.
props
.
element
).
find
(
'
.dummy_window
'
).
height
()
*
...
@@ -163,8 +163,8 @@
...
@@ -163,8 +163,8 @@
function
convertToRelativePosition
(
gadget
,
x
,
y
)
{
function
convertToRelativePosition
(
gadget
,
x
,
y
)
{
var
zoom_level
=
gadget
.
props
.
zoom_level
*
1.1111
,
var
zoom_level
=
gadget
.
props
.
zoom_level
*
1.1111
,
canvas_size_x
=
$
(
gadget
.
props
.
element
).
find
(
'
#main
'
).
width
(),
canvas_size_x
=
$
(
gadget
.
props
.
main
).
width
(),
canvas_size_y
=
$
(
gadget
.
props
.
element
).
find
(
'
#main
'
).
height
(),
canvas_size_y
=
$
(
gadget
.
props
.
main
).
height
(),
size_x
=
$
(
gadget
.
props
.
element
).
find
(
'
.dummy_window
'
).
width
()
*
size_x
=
$
(
gadget
.
props
.
element
).
find
(
'
.dummy_window
'
).
width
()
*
zoom_level
,
zoom_level
,
size_y
=
$
(
gadget
.
props
.
element
).
find
(
'
.dummy_window
'
).
height
()
*
size_y
=
$
(
gadget
.
props
.
element
).
find
(
'
.dummy_window
'
).
height
()
*
...
@@ -548,7 +548,7 @@
...
@@ -548,7 +548,7 @@
}
}
function
addNode
(
gadget
,
node_id
,
node_data
)
{
function
addNode
(
gadget
,
node_id
,
node_data
)
{
var
render_element
=
$
(
gadget
.
props
.
element
).
find
(
"
#main
"
),
var
render_element
=
$
(
gadget
.
props
.
main
),
class_definition
=
gadget
.
props
.
data
.
class_definition
[
node_data
.
_class
],
class_definition
=
gadget
.
props
.
data
.
class_definition
[
node_data
.
_class
],
coordinate
=
node_data
.
coordinate
,
coordinate
=
node_data
.
coordinate
,
dom_element_id
,
dom_element_id
,
...
...
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