Toggle navigation
Toggle navigation
This project
Loading...
Sign in
arcs
/
arcs.js
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
3
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jean-Yves Didier
2017-10-08 21:25:34 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4ea9d2189f9797127d51494bda3c39ba4e57fc6a
4ea9d218
1 parent
72ddb5de
context changes
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
3 deletions
build/arcs.js
build/arcs.min.js
src/context.js
tests/pipe/pipe.html
build/arcs.js
View file @
4ea9d21
...
...
@@ -372,11 +372,12 @@ ARCS.Context = function( ctx ) {
// we need currying here !
var
delayInstanciation
=
function
(
p
,
factory
)
{
return
function
(
obj
)
{
console
.
log
(
"instanciating from data file"
);
components
[
p
].
instance
=
new
factory
(
obj
);
return
Promise
.
resolve
();
}
};
console
.
log
(
"loading data file"
,
components
[
p
].
url
);
promises
.
push
(
loadDataFile
(
components
[
p
].
url
).
then
(
delayInstanciation
(
p
,
factory
))
);
...
...
build/arcs.min.js
View file @
4ea9d21
This diff is collapsed. Click to expand it.
src/context.js
View file @
4ea9d21
...
...
@@ -140,11 +140,12 @@ ARCS.Context = function( ctx ) {
// we need currying here !
var
delayInstanciation
=
function
(
p
,
factory
)
{
return
function
(
obj
)
{
console
.
log
(
"instanciating from data file"
);
components
[
p
].
instance
=
new
factory
(
obj
);
return
Promise
.
resolve
();
}
};
console
.
log
(
"loading data file"
,
components
[
p
].
url
);
promises
.
push
(
loadDataFile
(
components
[
p
].
url
).
then
(
delayInstanciation
(
p
,
factory
))
);
...
...
tests/pipe/pipe.html
View file @
4ea9d21
...
...
@@ -13,7 +13,7 @@
</head>
<body>
<video
id=
"video"
width=
320
height=
240
autoplay=
"true"
loop=
"true"
style=
"display: none;"
>
<video
id=
"video"
width=
320
height=
240
autoplay=
"true"
style=
"display: none;"
>
</video>
<canvas
id=
"canvas"
></canvas>
<div
id=
"container"
></div>
...
...
Please
register
or
login
to post a comment