@fabwcie/free-drawing / components/Slideshow
components/Slideshow
Classes
Slideshow
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:38
Presentation of the frames of the drawing, one after the other as slides (reading order): each one fills the view, around it masked, the interface hidden but a bar (previous, number, next, stop), the laser as pointer, on the whole screen when the browser allows it. Keys: arrows, Page Up / Down and Space go from one slide to the next, Home / End to the first / last one, Escape stops. The owner of a collaboration session presents its slides: other users follow them. The view, the tool and the size of the drawer come back once it stops
Constructors
Constructor
new Slideshow(
drawer):Slideshow
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:75
Create the hidden bar in the floating region; slides found again when the drawing changes, the slide fitted again to the view when the drawer is resized
Parameters
drawer
Drawer whose frames are presented
Returns
Properties
$bar
$bar:
HTMLDivElement
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:42
Bar of the slideshow: previous, number and title of the slide, next, stop
$count
$count:
HTMLSpanElement
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:44
Number of the slide shown and of the slides
$nextButton
$nextButton:
HTMLButtonElement
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:50
Button showing the next slide
$previousButton
$previousButton:
HTMLButtonElement
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:48
Button showing the previous slide
$stopButton
$stopButton:
HTMLButtonElement
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:52
Button stopping the slideshow
$title
$title:
HTMLSpanElement
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:46
Title of the slide shown (name of its frame)
drawer
drawer:
Drawer
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:40
Drawer whose frames are presented
index
index:
number=-1
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:56
Index of the slide shown in slides, -1 when the slideshow is stopped
slides
slides:
Frame[] =[]
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:54
Frames presented, in reading order (found again when the drawing changes)
Accessors
active
Get Signature
get active():
boolean
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:111
Slideshow going on
Returns
boolean
True while a slide is shown
current
Get Signature
get current():
Frame|null
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:119
Frame of the slide shown
Returns
Frame | null
Frame shown, null without slideshow
Methods
_activate()
private_activate(tool):void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:425
Tool activated (laser during the slideshow, the previous tool after it), none deactivates the active one
Parameters
tool
BaseWidget | null
Tool to activate, null for none
Returns
void
_createButton()
private_createButton(icon,label,shortcut,action):HTMLButtonElement
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:475
Icon button of the bar, named by its translated label, its key in its tooltip
Parameters
icon
string
SVG markup of the icon
label
"drawer.label" | "language.auto" | "toast.collaborationUnavailable" | "toast.collaborationFull" | "toast.collaborationTooBig" | "toast.canDraw" | "toast.viewOnly" | "toast.joinedViewOnly" | "toast.presentationStarted" | "toast.presentationEnded" | "toast.requestSent" | "toast.requestReceived" | "toast.requestRefused" | "toast.saveFailed" | "toast.saved" | "toast.styleCopied" | "toast.libraryImported" | "toast.libraryNotSaved" | "toast.loadFailed" | "toast.invalidFile" | "toast.linkCopied" | "toast.linkNotCopied" | "toast.invalidLink" | "toast.invalidShapeLink" | "toast.clipboardUnavailable" | "toast.exportFailed" | "toast.imageCopied" | "toast.storageCleared" | "toast.imageNotCopied" | "error.clipboardUnavailable" | "error.nothingToExport" | "error.notDrawingFile" | "error.notImage" | "error.damagedLink" | "error.drawingTooBig" | "error.imageNotCreated" | "error.serverUnreachable" | "error.notAllowed" | "error.storageFull" | "error.notLibraryFile" | "error.noDrawingInImage" | "error.insecurePage" | "error.roomKey" | "error.encryptionUnsupported" | "toast.selectionTool" | "modal.close" | "confirm.message" | "confirm.clearCanvas" | "confirm.clearStorage" | "confirm.stopCollaboration" | "confirm.leaveCollaboration" | "confirm.cancel" | "confirm.confirm" | "menu.label" | "menu.open" | "menu.saveAs" | "menu.save" | "menu.unsaved" | "menu.copyLink" | "menu.collaboration" | "menu.collaborationOn" | "menu.collaborationUsers" | "menu.export" | "menu.clearCanvas" | "menu.showGrid" | "menu.zenMode" | "menu.darkMode" | "menu.github" | "menu.githubLabel" | "menu.clearStorage" | "menu.background" | "menu.language" | "menu.commands" | "menu.preferences" | "preferences.title" | "preferences.autoSave" | "preferences.shapeRecognition" | "grid.style" | "grid.squares" | "grid.dots" | "grid.lines" | "grid.isometric" | "grid.styleCommand" | "preferences.wheel" | "wheel.zoom" | "wheel.pan" | "wheel.command" | "help.spaceDrag" | "help.wheelDrag" | "preferences.save" | "preferences.appearance" | "preferences.theme" | "preferences.light" | "preferences.dark" | "preferences.system" | "preferences.drawing" | "commands.search" | "commands.empty" | "commands.file" | "commands.language" | "color.white" | "color.lightGray" | "color.lightBlue" | "color.lightYellow" | "color.lightBeige" | "color.lightRed" | "color.lightGreen" | "color.black" | "color.red" | "color.green" | "color.blue" | "color.orange" | "color.yellow" | "color.pink" | "color.transparent" | "color.custom" | "color.pick" | "help.title" | "help.documentation" | "help.issue" | "help.shortcuts" | "help.tools" | "help.editor" | "help.view" | "help.or" | "help.selectAll" | "help.deleteSelection" | "help.duplicate" | "help.group" | "help.selectInGroup" | "help.constrainDrawing" | "help.whileDrawing" | "help.cancelDrawing" | "help.arrowUnlinked" | "help.constrainSelection" | "help.whileTransforming" | "help.move" | "help.forwardBackward" | "help.frontBack" | "help.lock" | "help.paste" | "help.open" | "help.save" | "help.export" | "help.grid" | "help.layers" | "help.layersSelect" | "help.snap" | "help.zoom" | "help.toolsConstrain" | "key.delete" | "key.arrows" | "key.click" | "key.space" | "key.wheel" | "key.ctrl" | "key.shift" | "key.alt" | "key.escape" | "key.enter" | "key.tab" | "key.home" | "key.end" | "key.backspace" | "toolbar.label" | "toolbar.moreTools" | "toolbar.keepTool" | "tools.pan" | "tools.selection" | "tools.brush" | "tools.eraser" | "tools.text" | "tools.note" | "tools.line" | "tools.square" | "tools.circle" | "tools.arrow" | "tools.image" | "tools.triangle" | "tools.diamond" | "tools.laser" | "tools.frame" | "zoom.label" | "zoom.out" | "zoom.in" | "zoom.reset" | "zoom.fit" | "zoom.selection" | "zoom.to100" | "history.label" | "history.undo" | "history.redo" | "position.label" | "position.recenter" | "context.paste" | "context.snap" | "context.lock" | "context.unlock" | "selectionMenu.label" | "action.duplicate" | "action.copyStyle" | "action.pasteStyle" | "library.title" | "library.add" | "library.empty" | "library.hint" | "library.insert" | "library.remove" | "library.import" | "library.export" | "library.close" | "library.shapes" | "search.label" | "search.count" | "search.none" | "slideshow.start" | "slideshow.presentFrom" | "slideshow.label" | "slideshow.previous" | "slideshow.next" | "slideshow.stop" | "slideshow.count" | "slideshow.slide" | "slideshow.slideTitled" | "slideshow.noFrames" | "slideshow.nextPrevious" | "slideshow.firstLast" | "slideshow.whilePresenting" | "replay.start" | "replay.label" | "replay.play" | "replay.pause" | "replay.restart" | "replay.speed" | "replay.stop" | "replay.count" | "replay.empty" | "replay.finished" | "replay.playPause" | "replay.step" | "replay.firstLast" | "replay.whileReplaying" | "navigation.description" | "navigation.text" | "navigation.shapes" | "navigation.from" | "navigation.to" | "navigation.link" | "navigation.locked" | "navigation.in" | "navigation.index" | "navigation.left" | "navigation.nextPrevious" | "navigation.enter" | "navigation.parent" | "navigation.leave" | "navigation.onDrawing" | "search.previous" | "search.next" | "search.close" | "action.group" | "action.ungroup" | "action.sendToBack" | "action.sendBackward" | "action.bringForward" | "action.bringToFront" | "action.delete" | "action.rotateRight" | "action.rotateLeft" | "action.flipHorizontal" | "action.flipVertical" | "action.insertImage" | "toast.imageFailed" | "action.alignLeft" | "action.alignCenter" | "action.alignRight" | "action.alignTop" | "action.alignMiddle" | "action.alignBottom" | "action.distributeHorizontal" | "action.distributeVertical" | "action.stackHorizontal" | "action.stackVertical" | "action.fitTextWidth" | "action.copyPng" | "action.copySvg" | "action.link" | "overlay.tool" | "overlay.selection" | "overlay.shape" | "overlay.brush" | "overlay.recognizeShapes" | "overlay.recognizeShapesHint" | "overlay.note" | "overlay.text" | "overlay.stroke" | "overlay.color" | "overlay.background" | "overlay.strokeWidth" | "overlay.strokeStyle" | "overlay.edges" | "overlay.arrowType" | "overlay.startHead" | "overlay.endHead" | "overlay.opacity" | "overlay.layers" | "overlay.align" | "overlay.distribute" | "overlay.actions" | "link.address" | "link.placeholder" | "link.open" | "link.remove" | "width.thin" | "width.medium" | "width.thick" | "width.extraThick" | "style.solid" | "style.dashed" | "style.dotted" | "edges.sharp" | "edges.round" | "edges.radius" | "edges.auto" | "arrow.straight" | "arrow.curved" | "arrow.elbow" | "arrowhead.none" | "arrowhead.arrow" | "arrowhead.triangle" | "arrowhead.dot" | "arrowhead.bar" | "text.fontFamily" | "text.fontSize" | "text.small" | "text.medium" | "text.large" | "text.extraLarge" | "text.style" | "text.bold" | "text.italic" | "text.underline" | "text.strikethrough" | "text.align" | "text.alignLeft" | "text.alignCenter" | "text.alignRight" | "layers.title" | "layers.group" | "layers.close" | "layers.empty" | "layers.drag" | "layers.shapesOf" | "layers.hide" | "layers.lock" | "layers.delete" | "layers.name" | "layers.toggle" | "layers.range" | "shapes.freehand" | "shapes.line" | "shapes.rect" | "shapes.ellipse" | "shapes.arrow" | "shapes.triangle" | "shapes.diamond" | "shapes.heart" | "shapes.cloud" | "shapes.star" | "shapes.hexagon" | "shapes.blockArrow" | "shapes.bubble" | "shapes.checkbox" | "shapes.shape" | "shapes.highlighter" | "shapes.frame" | "shapes.frameName" | "shapes.text" | "shapes.note" | "shapes.group" | "shapes.image" | "export.title" | "export.empty" | "export.options" | "export.selected" | "export.background" | "export.dark" | "export.withDrawing" | "export.scale" | "export.saveAs" | "export.saveFile" | "export.copy" | "export.preview" | "collab.title" | "collab.intro" | "collab.introInvited" | "collab.introJoined" | "collab.introJoinedOf" | "collab.name" | "collab.anonymous" | "collab.link" | "collab.copy" | "collab.qrCode" | "collab.start" | "collab.join" | "collab.stop" | "collab.leave" | "collab.live" | "collab.liveState" | "collab.connected" | "collab.connecting" | "collab.you" | "collab.invitedBy" | "collab.canDrawLabel" | "collab.canDraw" | "collab.newUsersCanDraw" | "collab.encrypted" | "collab.notEncrypted" | "collab.owner" | "collab.viewOnly" | "collab.present" | "collab.presenting" | "collab.follow" | "collab.followPresentation" | "collab.following" | "collab.youCanDraw" | "collab.youViewOnly" | "collab.requestEdit" | "collab.requestSent" | "collab.requests" | "collab.requestsCount" | "collab.accept" | "collab.refuse" | "collab.acceptLabel" | "collab.refuseLabel" | "collab.users" | "collab.settings"
Key of the accessible name and tooltip (translated again when language changes)
shortcut
string
Key of the same action
action
() => void
Run on click
Returns
HTMLButtonElement
Button, to add to the bar
_describe()
private_describe():string
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:383
Slide shown, as read by screen readers
Returns
string
Number of the slide and of the slides, with its title
_drawMask()
private_drawMask(context):void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:395
Mask drawn around the area: 4 rectangles from the edges of the view (and beyond) to the area, in the background color of the drawing (white without one)
Parameters
context
Context
Konva context of the selection layer
Returns
void
_enterFullscreen()
private_enterFullscreen():void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:433
Drawer on the whole screen, when the browser allows it (else the slideshow stays in the drawer)
Returns
void
_exitFullscreen()
private_exitFullscreen():void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:445
Whole screen left by the slideshow
Returns
void
_onFullscreenChange()
private_onFullscreenChange():void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:455
Whole screen entered: stage of the size of the screen; left by the browser (Escape): slideshow stopped
Returns
void
_show()
private_show(announce?):void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:329
Slide shown: fitted to the view, around it masked, bar updated
Parameters
announce?
boolean = false
Number and title of the slide read by screen readers (slide changed)
Returns
void
_update()
private_update():void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:344
Slides found again once the drawing changed: the slide shown kept (shown again when its box changed), the slideshow stopped without frame
Returns
void
_updateBar()
private_updateBar():void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:365
Number and title of the slide shown in the bar, buttons enabled where there is a slide to go to
Returns
void
getSlideArea()
getSlideArea():
IRect|null
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:271
Area of the slide shown, presented to other users of a collaboration session
Returns
IRect | null
Box of the frame shown, in drawing coordinates, null without slideshow
goTo()
goTo(
index):void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:192
Show a slide: fitted to the view, around it masked, its number read
Parameters
index
number
Index of the slide (kept in the slides), the slide shown fitted again when it is the same
Returns
void
handleKey()
handleKey(
e):void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:243
Keys of the drawer during the slideshow (see HotKey): next, previous, first, last slide, stop. Other keys do nothing in the drawer, shortcuts of the browser (Ctrl / Cmd) are kept
Parameters
e
KeyboardEvent
Key pressed in the drawer
Returns
void
hideMask()
hideMask():
void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:316
Mask removed: whole drawing shown again
Returns
void
hideSlideArea()
hideSlideArea():
void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:289
Area of a slide of another user no longer shown alone (presentation stopped, view moved), unless this user presents its own slides
Returns
void
next()
next():
void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:177
Show the next slide (nothing after the last one)
Returns
void
previous()
previous():
void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:184
Show the previous slide (nothing before the first one)
Returns
void
showMask()
showMask(
area):void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:298
Mask of the drawing around an area (background color of the drawing), above the drawing, under the cursors and lasers of the selection layer
Parameters
area
IRect
Area shown, in drawing coordinates
Returns
void
showSlideArea()
showSlideArea(
area):void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:280
Area of a slide shown alone: fitted to the view (space around it), around it masked. Slides of the owner presenting them to the users of a session
Parameters
area
IRect
Area of the slide, in drawing coordinates
Returns
void
start()
start(
from?,options?):boolean
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:130
Start the slideshow from a frame: from the selected frame by default, else from the first one. Without frame, told in a toast. Its first slide is shown at once, on the whole screen once the browser allows it
Parameters
from?
Frame shown first
options?
SlideshowOptions = {}
Whole screen (fullscreen, true by default)
Returns
boolean
True when it started (or showed this frame), false without frame
stop()
stop():
void
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:211
Stop the slideshow: interface, tool, size and view of the drawer given back, presentation of the session stopped when the slideshow started it
Returns
void
Variables
slideMaskName
constslideMaskName:"drawer-slideshow-mask"='drawer-slideshow-mask'
Defined in: packages/free-drawing/src/components/Slideshow/Slideshow.ts:20
Name of the mask around the slide shown, in the selection layer