Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presenter Console #10107

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d1d4a23
browser: slideshow: simplify notify blocked popup
hcvcastro Sep 24, 2024
cff55ad
browser: slideshow: simplify 'onSlideShowInfo'
hcvcastro Sep 24, 2024
32f4c40
browser: slideshow: add options parameter to SlideShowPresenter
hcvcastro Sep 24, 2024
2ff6f16
browser: slideshow: add options parameter to not start presentation
hcvcastro Sep 24, 2024
11a321c
browser: slideshow: change to public '_startSlide' access
hcvcastro Sep 24, 2024
8196ecd
browser: slideshow: add 'PresenterConsole' class
hcvcastro Sep 24, 2024
6c2840e
browser: slideshow: avoid unhandled excpetions requestedSlideHash
hcvcastro Sep 24, 2024
62c31d3
browser: slideshow: add relationship Renderer <-> Presenter
hcvcastro Sep 25, 2024
5efbd95
browser: slideshow: add animation renderer with respective instance
hcvcastro Sep 25, 2024
5dbda04
browser: slideshow: fix instance of 'getAnimatedLayerInfo'
hcvcastro Sep 25, 2024
2151c18
browser: slideshow: simplify setPresenter
hcvcastro Sep 26, 2024
e605524
browser: slideshow: fix deleting master page layers
hcvcastro Sep 27, 2024
45fb47d
browser: slideshow: fix cached draw pages
hcvcastro Sep 30, 2024
79e1cfd
browser: slideshow: add option to not attach click event
hcvcastro Sep 30, 2024
a4450ec
browser: slideshow: add click event to presenter console
hcvcastro Sep 30, 2024
e8ca172
browser: slideshow: add keydown event to presenter console
hcvcastro Sep 30, 2024
e3bc4a9
browser: slideshow: ensure 1 instance of the presenter console
hcvcastro Sep 30, 2024
a77b5a0
browser: slideshow: move presenter console to bottom right corner
hcvcastro Oct 1, 2024
e7d1933
browser: slideshow: ensure presenter console to handle events
hcvcastro Oct 2, 2024
f5462f2
browser: slideshow: ensure render 2d of the presenter console
hcvcastro Oct 2, 2024
94d37a7
browser: slideshow: handle close presentation windows
hcvcastro Oct 2, 2024
cda5cc0
browser: slideshow: ensure reset the start slide
hcvcastro Oct 2, 2024
737a145
browser: slideshow: add missing 2d static text render
hcvcastro Oct 2, 2024
c1712ae
browser: slideshow: ensure min, max slide navigation
hcvcastro Oct 2, 2024
498a030
browser: slideshow: add option to no style canvas
hcvcastro Oct 4, 2024
6b5d1e8
browser: slideshow: add hash to protocol "sliderenderingcomplete"
hcvcastro Oct 4, 2024
6e1500d
browser: slideshow: generate presenter console basic html
hcvcastro Oct 4, 2024
6722ef8
browser: slideshow: create canvas instances for presenter console
hcvcastro Oct 4, 2024
dac126e
browser: slideshow: add notes to presenter console
hcvcastro Oct 7, 2024
9bf9307
browser: slideshow: ensure no animation for presenter console
hcvcastro Oct 7, 2024
6b64ce3
browser: slideshow: add timer to presenter console
hcvcastro Oct 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions browser/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ COOL_JS_LST =\
src/slideshow/RenderContext.ts \
src/slideshow/SlideRenderer.ts \
src/slideshow/SlideShowPresenter.ts \
src/slideshow/PresenterConsole.js \
src/slideshow/SimpleTextureRenderer.ts \
src/slideshow/StaticTextRenderer.ts \
src/slideshow/PauseTimer.ts \
Expand Down
42 changes: 42 additions & 0 deletions browser/images/lc_presenterconsole.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions browser/src/control/Control.NotebookbarImpress.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,14 @@ L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({
'command': 'presentinwindow',
'accessibility': { focusBack: true, combination: 'PW', de: null }
} : {},
!window.ThisIsAMobileApp ?
{
'id': 'view-presentation-in-console',
'type': 'bigcustomtoolitem',
'text': _('Presenter Console'),
'command': 'presenterconsole',
'accessibility': { focusBack: true, combination: 'PW', de: null }
}: {},
{
'id': 'fullscreen',
'type': 'bigtoolitem',
Expand Down
1 change: 1 addition & 0 deletions browser/src/control/Control.UIManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ L.Control.UIManager = L.Control.extend({
$('#presentation-controls-wrapper').show();
this.initializeRuler();
this.map.slideShowPresenter = new SlideShow.SlideShowPresenter(this.map);
this.map.presenterConsole = new SlideShow.PresenterConsole(this.map);
}

if (docType === 'text') {
Expand Down
5 changes: 5 additions & 0 deletions browser/src/docdispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,11 @@ class Dispatcher {
else app.map.fire('presentinwindow');
};

this.actionsMap['presenterconsole'] = () => {
if (app.map._debug.debugOn || app.isExperimentalMode())
app.map.fire('newpresentinconsole');
};

this.actionsMap['fullscreen-drawing'] = () => {
L.toggleFullScreen();
};
Expand Down
10 changes: 3 additions & 7 deletions browser/src/layer/tile/CanvasTileLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1651,20 +1651,16 @@ L.CanvasTileLayer = L.Layer.extend({
this._map.fire('adminuser');
} else if (textMsg.startsWith('presentationinfo:')) {
var content = JSON.parse(textMsg.substring('presentationinfo:'.length + 1));
if (this._map.slideShowPresenter) {
this._map.slideShowPresenter.onSlideShowInfo(content);
}
this._map.fire('presentationinfo', content);
} else if (textMsg.startsWith('slidelayer:')) {
const content = JSON.parse(textMsg.substring('slidelayer:'.length + 1));
this._map.fire('slidelayer', {
message: content,
image: img
});
} else if (textMsg.startsWith('sliderenderingcomplete:')) {
const status = textMsg.substring('sliderenderingcomplete:'.length + 1);
this._map.fire('sliderenderingcomplete', {
success: status === 'success'
});
const data = JSON.parse(textMsg.substring('sliderenderingcomplete:'.length + 1));
this._map.fire('sliderenderingcomplete', data);
}
},

Expand Down
27 changes: 21 additions & 6 deletions browser/src/slideshow/LayerDrawing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,15 +285,15 @@ class LayerDrawing {
}

if (this.slideCache.has(slideHash)) {
this.onSlideRenderingComplete({ success: true });
this.onSlideRenderingComplete({ success: true, slide: slideHash });
return;
}

const backgroundRendered = this.drawBackground(slideHash);
const masterPageRendered = this.drawMasterPage(slideHash);
if (backgroundRendered && masterPageRendered) {
if (this.drawDrawPage(slideHash)) {
this.onSlideRenderingComplete({ success: true });
this.onSlideRenderingComplete({ success: true, slide: slideHash });
return;
}
}
Expand Down Expand Up @@ -484,10 +484,10 @@ class LayerDrawing {
}

var hasField = false;
for (const layer of layers) {
this.drawMasterPageLayer(layer, slideHash);
if (layer.isField) {
this.cachedMasterPages.delete(slideInfo.masterPage);
for (const layer in layers) {
this.drawMasterPageLayer(layers[layer], slideHash);
if (layers[layer].isField) {
delete layers[layer];
hasField = true;
}
}
Expand Down Expand Up @@ -596,6 +596,21 @@ class LayerDrawing {
this.prefetchedSlideHash = null;
return;
}

if (!this.requestedSlideHash) {
app.console.warn('onSlideRenderingComplete: requestedSlideHash is null');
return;
mcecchetti marked this conversation as resolved.
Show resolved Hide resolved
}

const layers = this.cachedDrawPages.get(this.requestedSlideHash);
if (!layers || layers.length === 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to reset
this.requestedSlideHash = null;
this.prefetchedSlideHash = null;

return;
}

if (e.slide !== this.requestedSlideHash) {
return;
}

const reqSlideInfo = this.getSlideInfo(this.requestedSlideHash);

this.cacheAndNotify();
Expand Down
Loading
Loading