Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
renderjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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
Sven Franck
renderjs
Commits
c8ad49b4
Commit
c8ad49b4
authored
Nov 14, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use asynchronous versus asynchronous way for calling destination gadget
interaction method (use as a 'transport' HTML events).
parent
9bcdd5fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
renderjs.js
renderjs.js
+11
-2
No files found.
renderjs.js
View file @
c8ad49b4
...
@@ -522,12 +522,13 @@ var RenderJs = (function () {
...
@@ -522,12 +522,13 @@ var RenderJs = (function () {
source_method_id
,
destination_gadget_id
,
source_method_id
,
destination_gadget_id
,
destination_method_id
)
{
destination_method_id
)
{
var
interaction
=
function
()
{
var
interaction
=
function
()
{
// execute source method
RenderJs
.
GadgetIndex
.
getGadgetById
(
RenderJs
.
GadgetIndex
.
getGadgetById
(
source_gadget_id
)[
original_source_method_id
].
source_gadget_id
)[
original_source_method_id
].
apply
(
null
,
arguments
);
apply
(
null
,
arguments
);
// call trigger so bind can be asynchronously called
RenderJs
.
GadgetIndex
.
getGadgetById
(
RenderJs
.
GadgetIndex
.
getGadgetById
(
destination_gadget_id
)[
destination_method_id
].
destination_gadget_id
).
dom
.
trigger
(
source_method_id
);
apply
(
null
,
arguments
);
};
};
return
interaction
;
return
interaction
;
},
},
...
@@ -574,6 +575,14 @@ var RenderJs = (function () {
...
@@ -574,6 +575,14 @@ var RenderJs = (function () {
destination_gadget_id
,
destination_gadget_id
,
destination_method_id
destination_method_id
);
);
// we use html custom events for asyncronous method call so
// bind destination_gadget to respective event
destination_gadget
.
dom
.
bind
(
source_method_id
,
createTriggerInteraction
(
destination_gadget_id
,
destination_method_id
)
);
}
}
else
{
else
{
// this is a custom event attached to HTML gadget
// this is a custom event attached to HTML gadget
...
...
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