@@ -13,7 +13,8 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
13
13
options : CanvasWhiteboardOptions ;
14
14
batchUpdateTimeoutDuration : number ;
15
15
private _imageUrl ;
16
- imageUrl : string ;
16
+ set imageUrl ( imageUrl : string ) ;
17
+ get imageUrl ( ) : string ;
17
18
aspectRatio : number ;
18
19
drawButtonClass : string ;
19
20
clearButtonClass : string ;
@@ -94,28 +95,28 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
94
95
*
95
96
* @param options
96
97
*/
97
- private _initInputsFromOptions ( options ) ;
98
- private _isNullOrUndefined ( property ) ;
98
+ private _initInputsFromOptions ;
99
+ private _isNullOrUndefined ;
99
100
/**
100
101
* Init global window listeners like resize and keydown
101
102
*/
102
- private _initCanvasEventListeners ( ) ;
103
+ private _initCanvasEventListeners ;
103
104
/**
104
105
* Subscribes to new signals in the canvas whiteboard service and executes methods accordingly
105
106
* Because of circular publishing and subscribing, the canvas methods do not use the service when
106
107
* local actions are completed (Ex. clicking undo from the button inside this component)
107
108
*/
108
- private _initCanvasServiceObservables ( ) ;
109
+ private _initCanvasServiceObservables ;
109
110
/**
110
111
* Calculate the canvas width and height from it's parent container width and height (use aspect ratio if needed)
111
112
*/
112
- private _calculateCanvasWidthAndHeight ( ) ;
113
+ private _calculateCanvasWidthAndHeight ;
113
114
/**
114
115
* Load an image and draw it on the canvas (if an image exists)
115
116
* @param callbackFn A function that is called after the image loading is finished
116
117
* @return Emits a value when the image has been loaded.
117
118
*/
118
- private _loadImage ( callbackFn ? ) ;
119
+ private _loadImage ;
119
120
/**
120
121
* Sends a notification after clearing the canvas
121
122
* This method should only be called from the clear button in this component since it will emit an clear event
@@ -131,14 +132,14 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
131
132
* It calls a callback function after redrawing
132
133
* @param callbackFn
133
134
*/
134
- private _removeCanvasData ( callbackFn ? ) ;
135
+ private _removeCanvasData ;
135
136
/**
136
137
* Clears the canvas and redraws the image if the url exists.
137
138
* @param callbackFn A function that is called after the background is redrawn
138
139
* @return Emits a value when the clearing is finished
139
140
*/
140
- private _redrawBackground ( callbackFn ? ) ;
141
- private _drawStartingColor ( ) ;
141
+ private _redrawBackground ;
142
+ private _drawStartingColor ;
142
143
/**
143
144
* @deprecated Use getDrawingEnabled(): boolean
144
145
*/
@@ -193,7 +194,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
193
194
* This method takes an UUID for an update, and redraws the canvas by making all updates with that uuid invisible
194
195
* @param updateUUID
195
196
*/
196
- private _undoCanvas ( updateUUID ) ;
197
+ private _undoCanvas ;
197
198
/**
198
199
* This method is invoked by the redo button on the canvas screen
199
200
* It calls the global redo method and emits a notification after redoing
@@ -211,7 +212,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
211
212
* This method takes an UUID for an update, and redraws the canvas by making all updates with that uuid visible
212
213
* @param updateUUID
213
214
*/
214
- private _redoCanvas ( updateUUID ) ;
215
+ private _redoCanvas ;
215
216
/**
216
217
* Catches the Mouse and Touch events made on the canvas.
217
218
* If drawing is disabled (If an image exists but it's not loaded, or the user did not click Draw),
@@ -235,15 +236,15 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
235
236
* If it is not a touch event, use the original mouse event received
236
237
* @param eventData
237
238
*/
238
- private _getCanvasEventPosition ( eventData ) ;
239
+ private _getCanvasEventPosition ;
239
240
/**
240
241
* The update coordinates on the canvas are mapped so that all receiving ends
241
242
* can reverse the mapping and get the same position as the one that
242
243
* was drawn on this update.
243
244
*
244
245
* @param update The CanvasWhiteboardUpdate object.
245
246
*/
246
- private _prepareToSendUpdate ( update ) ;
247
+ private _prepareToSendUpdate ;
247
248
/**
248
249
* Catches the Key Up events made on the canvas.
249
250
* If the ctrlKey or commandKey(macOS) was held and the keyCode is 90 (z), an undo action will be performed
@@ -252,15 +253,15 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
252
253
*
253
254
* @param event The event that occurred.
254
255
*/
255
- private _canvasKeyDown ( event ) ;
256
+ private _canvasKeyDown ;
256
257
/**
257
258
* On window resize, recalculate the canvas dimensions and redraw the history
258
259
*/
259
- private _redrawCanvasOnResize ( ) ;
260
+ private _redrawCanvasOnResize ;
260
261
/**
261
262
* Redraw the saved history after resetting the canvas state
262
263
*/
263
- private _redrawHistory ( ) ;
264
+ private _redrawHistory ;
264
265
/**
265
266
* Draws a CanvasWhiteboardUpdate object on the canvas.
266
267
* The coordinates are first reverse mapped so that they can be drawn in the proper place. The update
@@ -273,15 +274,15 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
273
274
*
274
275
* @param update The update object.
275
276
*/
276
- private _draw ( update ) ;
277
- private _drawIncompleteShapes ( ) ;
278
- private _swapCompletedShapeToActualCanvas ( shape ) ;
279
- private _resetIncompleteShapeCanvas ( ) ;
277
+ private _draw ;
278
+ private _drawIncompleteShapes ;
279
+ private _swapCompletedShapeToActualCanvas ;
280
+ private _resetIncompleteShapeCanvas ;
280
281
/**
281
282
* Delete everything from the screen, redraw the background, and then redraw all the shapes from the shapesMap
282
283
*/
283
284
drawAllShapes ( ) : void ;
284
- private _addCurrentShapeDataToAnUpdate ( update ) ;
285
+ private _addCurrentShapeDataToAnUpdate ;
285
286
generateShapePreviewOptions ( ) : CanvasWhiteboardShapeOptions ;
286
287
/**
287
288
* Sends the update to all receiving ends as an Event emit. This is done as a batch operation (meaning
@@ -291,7 +292,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
291
292
* @param update The update object.
292
293
* @return Emits an Array of Updates when the batch.
293
294
*/
294
- private _prepareUpdateForBatchDispatch ( update ) ;
295
+ private _prepareUpdateForBatchDispatch ;
295
296
/**
296
297
* Draws an Array of Updates on the canvas.
297
298
*
@@ -301,7 +302,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
301
302
/**
302
303
* Draw any missing updates that were received before the image was loaded
303
304
*/
304
- private _drawMissingUpdates ( ) ;
305
+ private _drawMissingUpdates ;
305
306
/**
306
307
* Draws an image on the canvas
307
308
*
@@ -314,7 +315,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
314
315
* @param offsetX The offsetX if the image size is larger than the canvas (aspect Ratio)
315
316
* @param offsetY The offsetY if the image size is larger than the canvas (aspect Ratio)
316
317
*/
317
- private _drawImage ( context , image , x , y , width , height , offsetX , offsetY ) ;
318
+ private _drawImage ;
318
319
/**
319
320
* The HTMLCanvasElement.toDataURL() method returns a data URI containing a representation of the image in the format specified by the type parameter (defaults to PNG).
320
321
* The returned image is in a resolution of 96 dpi.
@@ -354,7 +355,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
354
355
* @param blob
355
356
* @param returnedDataType
356
357
*/
357
- private _saveCanvasBlob ( blob , returnedDataType ? ) ;
358
+ private _saveCanvasBlob ;
358
359
/**
359
360
* This method generates a canvas url string or a canvas blob with the presented data type
360
361
* A callback function is then invoked since the blob creation must be done via a callback
@@ -371,7 +372,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
371
372
* @param returnedDataType
372
373
*/
373
374
saveLocal ( returnedDataType ?: string ) : void ;
374
- private _generateDataTypeString ( returnedDataType ) ;
375
+ private _generateDataTypeString ;
375
376
/**
376
377
* Toggles the color picker window, delegating the showColorPicker Input to the ColorPickerComponent.
377
378
* If no value is supplied (null/undefined) the current value will be negated and used.
@@ -400,9 +401,9 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
400
401
* Unsubscribe from a given subscription if it is active
401
402
* @param subscription
402
403
*/
403
- private _unsubscribe ( subscription ) ;
404
- private _generateUUID ( ) ;
405
- private _random4 ( ) ;
404
+ private _unsubscribe ;
405
+ private _generateUUID ;
406
+ private _random4 ;
406
407
/**
407
408
* Unsubscribe from the service observables
408
409
*/
0 commit comments