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
8d494d02
Commit
8d494d02
authored
Dec 22, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
schema expansion updated, encapsulated references are addressed - durty method
parent
43242bcc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
dream/platform/src/jsplumb/jsplumb.js
dream/platform/src/jsplumb/jsplumb.js
+31
-1
No files found.
dream/platform/src/jsplumb/jsplumb.js
View file @
8d494d02
...
@@ -583,7 +583,8 @@
...
@@ -583,7 +583,8 @@
function
expandProperties
(
definition
,
expanded_class_def
,
fullSchema
)
{
function
expandProperties
(
definition
,
expanded_class_def
,
fullSchema
)
{
console
.
log
(
"
expanding properties
"
);
console
.
log
(
"
expanding properties
"
);
var
property
,
temp1
,
temp2
;
console
.
log
(
definition
);
var
property
,
temp1
,
temp2
,
i
,
subProp
,
temp3
;
//, coppy;
for
(
property
in
definition
.
properties
)
{
for
(
property
in
definition
.
properties
)
{
if
(
definition
.
properties
.
hasOwnProperty
(
property
))
{
if
(
definition
.
properties
.
hasOwnProperty
(
property
))
{
console
.
log
(
"
...
"
);
console
.
log
(
"
...
"
);
...
@@ -598,11 +599,38 @@
...
@@ -598,11 +599,38 @@
definition
.
properties
[
property
],
fullSchema
definition
.
properties
[
property
],
fullSchema
);
);
console
.
log
(
"
there is a referenced property # #
"
);
console
.
log
(
"
there is a referenced property # #
"
);
console
.
log
(
property
);
expanded_class_def
.
properties
[
property
]
expanded_class_def
.
properties
[
property
]
=
temp1
;
=
temp1
;
if
(
temp1
.
allOf
)
{
if
(
temp1
.
allOf
[
1
].
oneOf
)
{
for
(
i
=
0
;
i
<=
temp1
.
allOf
[
1
].
oneOf
.
length
-
1
;
i
+=
1
)
{
if
(
temp1
.
allOf
[
1
].
oneOf
[
i
].
properties
)
{
for
(
subProp
in
temp1
.
allOf
[
1
].
oneOf
[
i
].
properties
)
{
if
(
temp1
.
allOf
[
1
].
oneOf
[
i
]
.
properties
.
hasOwnProperty
(
subProp
))
{
if
(
temp1
.
allOf
[
1
].
oneOf
[
i
].
properties
[
subProp
].
$ref
)
{
console
.
log
(
"
there is referenced sub-property
"
);
console
.
log
(
subProp
);
temp3
=
expandReference
(
temp1
.
allOf
[
1
].
oneOf
[
i
].
properties
[
subProp
],
fullSchema
);
expanded_class_def
.
properties
[
property
]
.
allOf
[
1
].
oneOf
[
i
].
properties
[
subProp
]
=
temp3
;
}
}
}
}
}
}
}
}
else
{
}
else
{
if
(
definition
.
properties
[
property
].
properties
)
{
if
(
definition
.
properties
[
property
].
properties
)
{
console
.
log
(
"
there is a property property --> recursive
"
);
console
.
log
(
"
there is a property property --> recursive
"
);
console
.
log
(
property
);
expanded_class_def
.
properties
[
property
]
=
{
properties
:
{}};
expanded_class_def
.
properties
[
property
]
=
{
properties
:
{}};
temp2
=
expandProperties
(
temp2
=
expandProperties
(
definition
.
properties
[
property
],
definition
.
properties
[
property
],
...
@@ -611,6 +639,8 @@
...
@@ -611,6 +639,8 @@
);
);
definition
.
properties
[
property
]
=
temp2
;
definition
.
properties
[
property
]
=
temp2
;
}
}
console
.
log
(
"
before expanding definition
"
);
console
.
log
(
property
);
expanded_class_def
.
properties
[
property
]
expanded_class_def
.
properties
[
property
]
=
definition
.
properties
[
property
];
=
definition
.
properties
[
property
];
}
}
...
...
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