Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-web-393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-web-393
Commits
301cc4bc
Commit
301cc4bc
authored
Apr 05, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
custom trigger after worker is done
parent
e233bb6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
jquery-jp4.js
src/jp4-canvas/jquery-jp4.js
+12
-4
No files found.
src/jp4-canvas/jquery-jp4.js
View file @
301cc4bc
...
...
@@ -51,6 +51,9 @@
}
},
options
);
// working time
var
T0
;
var
BAYER
=
settings
.
mosaic
;
var
FLIPV
=
0
;
var
FLIPH
=
0
;
...
...
@@ -122,7 +125,7 @@
$
(
this
).
draw
({
fn
:
function
(
ctx
){
var
t
0
=
Date
.
now
();
T
0
=
Date
.
now
();
if
((
IMAGE_FORMAT
==
"JP4"
)
||
(
IMAGE_FORMAT
==
"JP46"
)){
if
(
settings
.
fast
){
...
...
@@ -163,10 +166,10 @@
//saturation(ctx,SATURATION[0]);
}
console
.
log
(
"#"
+
elem
.
attr
(
"id"
)
+
", time: "
+
(
Date
.
now
()
-
t0
)
/
1000
+
" s"
);
// too early
//console.log("#"+elem.attr("id")+", time: "+(Date.now()-t0)/1000+" s");
// custom event
$
(
this
).
trigger
(
"canvas_ready"
);
//
$(this).trigger("canvas_ready");
if
(
settings
.
refresh
)
get_image
();
}
...
...
@@ -206,6 +209,11 @@
Elphel
.
Canvas
.
putImageData
(
working_context
,
pixels
,
width
,
height
);
Elphel
.
Canvas
.
drawScaled
(
cnv_working
,
cnv_display
,
settings
.
width
);
// report time
console
.
log
(
"#"
+
elem
.
attr
(
"id"
)
+
", time: "
+
(
Date
.
now
()
-
T0
)
/
1000
+
" s"
);
//trigger here
cnv_working
.
trigger
(
"canvas_ready"
);
}
}
...
...
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