Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.

Commit 4e3c5a8

Browse files
authored
Merge pull request #55 from preeco-privacy/angular9
Upgrade Angular 9
2 parents 2701d31 + cbaef4e commit 4e3c5a8

29 files changed

+1535
-767
lines changed

dist/bundles/ng2-canvas-whiteboard.umd.js

Lines changed: 227 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bundles/ng2-canvas-whiteboard.umd.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modules/ng2-canvas-whiteboard.es5.js

Lines changed: 224 additions & 83 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modules/ng2-canvas-whiteboard.js

Lines changed: 256 additions & 96 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ng2-canvas-whiteboard.metadata.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/package.json

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
"angular4",
2525
"angular5",
2626
"angular6",
27+
"angular7",
28+
"angular8",
29+
"angular9",
2730
"canvas",
2831
"drawing",
2932
"touch drawing",
@@ -44,29 +47,30 @@
4447
"lodash": "4.17.11"
4548
},
4649
"devDependencies": {
47-
"@angular/animations": "^6.0.0",
48-
"@angular/common": "^6.0.0",
49-
"@angular/compiler": "^6.0.0",
50-
"@angular/compiler-cli": "^6.0.0",
51-
"@angular/core": "^6.0.0",
52-
"@angular/platform-browser": "^6.0.0",
53-
"@angular/platform-browser-dynamic": "^6.0.0",
54-
"@angular/platform-server": "^6.0.0",
55-
"@types/lodash": "4.14.116",
56-
"@types/node": "7.0.10",
50+
"@angular/animations": "^9.0.1",
51+
"@angular/common": "^9.0.1",
52+
"@angular/compiler": "^9.0.1",
53+
"@angular/compiler-cli": "^9.0.1",
54+
"@angular/core": "^9.0.1",
55+
"@angular/platform-browser": "^9.0.1",
56+
"@angular/platform-browser-dynamic": "^9.0.1",
57+
"@angular/platform-server": "^9.0.1",
58+
"@types/lodash": "4.14.149",
59+
"@types/node": "13.7.2",
5760
"chalk": "1.1.3",
58-
"core-js": "2.4.1",
59-
"reflect-metadata": "0.1.10",
61+
"core-js": "^3.6.4",
62+
"reflect-metadata": "^0.1.13",
6063
"rollup": "0.41.6",
61-
"rxjs": "^6.1.0",
64+
"rxjs": "^6.5.4",
6265
"shelljs": "0.7.7",
6366
"sorcery": "0.10.0",
6467
"ts-helpers": "1.1.2",
6568
"ts-loader": "2.0.3",
66-
"typescript": "2.7.2",
69+
"tsickle": "^0.38.0",
70+
"typescript": "^3.7.5",
6771
"uglify-js": "^2.8.15",
6872
"webpack": "2.3.1",
6973
"yargs": "7.0.2",
70-
"zone.js": "^0.8.26"
74+
"zone.js": "^0.10.2"
7175
}
7276
}

dist/src/canvas-whiteboard-update.model.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { CanvasWhiteboardShapeOptions } from "./shapes/canvas-whiteboard-shape-o
22
export declare enum CanvasWhiteboardUpdateType {
33
START = 0,
44
DRAG = 1,
5-
STOP = 2,
5+
STOP = 2
66
}
77
export declare class CanvasWhiteboardUpdate {
88
x: number;

dist/src/canvas-whiteboard.component.d.ts

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
1313
options: CanvasWhiteboardOptions;
1414
batchUpdateTimeoutDuration: number;
1515
private _imageUrl;
16-
imageUrl: string;
16+
set imageUrl(imageUrl: string);
17+
get imageUrl(): string;
1718
aspectRatio: number;
1819
drawButtonClass: string;
1920
clearButtonClass: string;
@@ -94,28 +95,28 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
9495
*
9596
* @param options
9697
*/
97-
private _initInputsFromOptions(options);
98-
private _isNullOrUndefined(property);
98+
private _initInputsFromOptions;
99+
private _isNullOrUndefined;
99100
/**
100101
* Init global window listeners like resize and keydown
101102
*/
102-
private _initCanvasEventListeners();
103+
private _initCanvasEventListeners;
103104
/**
104105
* Subscribes to new signals in the canvas whiteboard service and executes methods accordingly
105106
* Because of circular publishing and subscribing, the canvas methods do not use the service when
106107
* local actions are completed (Ex. clicking undo from the button inside this component)
107108
*/
108-
private _initCanvasServiceObservables();
109+
private _initCanvasServiceObservables;
109110
/**
110111
* Calculate the canvas width and height from it's parent container width and height (use aspect ratio if needed)
111112
*/
112-
private _calculateCanvasWidthAndHeight();
113+
private _calculateCanvasWidthAndHeight;
113114
/**
114115
* Load an image and draw it on the canvas (if an image exists)
115116
* @param callbackFn A function that is called after the image loading is finished
116117
* @return Emits a value when the image has been loaded.
117118
*/
118-
private _loadImage(callbackFn?);
119+
private _loadImage;
119120
/**
120121
* Sends a notification after clearing the canvas
121122
* 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,
131132
* It calls a callback function after redrawing
132133
* @param callbackFn
133134
*/
134-
private _removeCanvasData(callbackFn?);
135+
private _removeCanvasData;
135136
/**
136137
* Clears the canvas and redraws the image if the url exists.
137138
* @param callbackFn A function that is called after the background is redrawn
138139
* @return Emits a value when the clearing is finished
139140
*/
140-
private _redrawBackground(callbackFn?);
141-
private _drawStartingColor();
141+
private _redrawBackground;
142+
private _drawStartingColor;
142143
/**
143144
* @deprecated Use getDrawingEnabled(): boolean
144145
*/
@@ -193,7 +194,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
193194
* This method takes an UUID for an update, and redraws the canvas by making all updates with that uuid invisible
194195
* @param updateUUID
195196
*/
196-
private _undoCanvas(updateUUID);
197+
private _undoCanvas;
197198
/**
198199
* This method is invoked by the redo button on the canvas screen
199200
* It calls the global redo method and emits a notification after redoing
@@ -211,7 +212,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
211212
* This method takes an UUID for an update, and redraws the canvas by making all updates with that uuid visible
212213
* @param updateUUID
213214
*/
214-
private _redoCanvas(updateUUID);
215+
private _redoCanvas;
215216
/**
216217
* Catches the Mouse and Touch events made on the canvas.
217218
* 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,
235236
* If it is not a touch event, use the original mouse event received
236237
* @param eventData
237238
*/
238-
private _getCanvasEventPosition(eventData);
239+
private _getCanvasEventPosition;
239240
/**
240241
* The update coordinates on the canvas are mapped so that all receiving ends
241242
* can reverse the mapping and get the same position as the one that
242243
* was drawn on this update.
243244
*
244245
* @param update The CanvasWhiteboardUpdate object.
245246
*/
246-
private _prepareToSendUpdate(update);
247+
private _prepareToSendUpdate;
247248
/**
248249
* Catches the Key Up events made on the canvas.
249250
* 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,
252253
*
253254
* @param event The event that occurred.
254255
*/
255-
private _canvasKeyDown(event);
256+
private _canvasKeyDown;
256257
/**
257258
* On window resize, recalculate the canvas dimensions and redraw the history
258259
*/
259-
private _redrawCanvasOnResize();
260+
private _redrawCanvasOnResize;
260261
/**
261262
* Redraw the saved history after resetting the canvas state
262263
*/
263-
private _redrawHistory();
264+
private _redrawHistory;
264265
/**
265266
* Draws a CanvasWhiteboardUpdate object on the canvas.
266267
* 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,
273274
*
274275
* @param update The update object.
275276
*/
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;
280281
/**
281282
* Delete everything from the screen, redraw the background, and then redraw all the shapes from the shapesMap
282283
*/
283284
drawAllShapes(): void;
284-
private _addCurrentShapeDataToAnUpdate(update);
285+
private _addCurrentShapeDataToAnUpdate;
285286
generateShapePreviewOptions(): CanvasWhiteboardShapeOptions;
286287
/**
287288
* 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,
291292
* @param update The update object.
292293
* @return Emits an Array of Updates when the batch.
293294
*/
294-
private _prepareUpdateForBatchDispatch(update);
295+
private _prepareUpdateForBatchDispatch;
295296
/**
296297
* Draws an Array of Updates on the canvas.
297298
*
@@ -301,7 +302,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
301302
/**
302303
* Draw any missing updates that were received before the image was loaded
303304
*/
304-
private _drawMissingUpdates();
305+
private _drawMissingUpdates;
305306
/**
306307
* Draws an image on the canvas
307308
*
@@ -314,7 +315,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
314315
* @param offsetX The offsetX if the image size is larger than the canvas (aspect Ratio)
315316
* @param offsetY The offsetY if the image size is larger than the canvas (aspect Ratio)
316317
*/
317-
private _drawImage(context, image, x, y, width, height, offsetX, offsetY);
318+
private _drawImage;
318319
/**
319320
* 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).
320321
* The returned image is in a resolution of 96 dpi.
@@ -354,7 +355,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
354355
* @param blob
355356
* @param returnedDataType
356357
*/
357-
private _saveCanvasBlob(blob, returnedDataType?);
358+
private _saveCanvasBlob;
358359
/**
359360
* This method generates a canvas url string or a canvas blob with the presented data type
360361
* 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,
371372
* @param returnedDataType
372373
*/
373374
saveLocal(returnedDataType?: string): void;
374-
private _generateDataTypeString(returnedDataType);
375+
private _generateDataTypeString;
375376
/**
376377
* Toggles the color picker window, delegating the showColorPicker Input to the ColorPickerComponent.
377378
* 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,
400401
* Unsubscribe from a given subscription if it is active
401402
* @param subscription
402403
*/
403-
private _unsubscribe(subscription);
404-
private _generateUUID();
405-
private _random4();
404+
private _unsubscribe;
405+
private _generateUUID;
406+
private _random4;
406407
/**
407408
* Unsubscribe from the service observables
408409
*/

dist/src/canvas-whiteboard.service.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CanvasWhiteboardUpdate } from "./canvas-whiteboard-update.model";
2-
import { Observable } from "rxjs/index";
2+
import { Observable } from "rxjs";
33
export declare class CanvasWhiteboardService {
44
private _canvasDrawSubject;
55
canvasDrawSubject$: Observable<CanvasWhiteboardUpdate[]>;

dist/src/shapes/canvas-whiteboard-shape-selector.component.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ElementRef, EventEmitter } from "@angular/core";
22
import { CanvasWhiteboardShapeService, INewCanvasWhiteboardShape } from "./canvas-whiteboard-shape.service";
33
import { CanvasWhiteboardShape } from "./canvas-whiteboard-shape";
44
import { CanvasWhiteboardShapeOptions } from "./canvas-whiteboard-shape-options";
5-
import { Observable } from "rxjs/index";
5+
import { Observable } from "rxjs";
66
export declare class CanvasWhiteboardShapeSelectorComponent {
77
private _elementRef;
88
private _canvasWhiteboardShapeService;

dist/src/shapes/canvas-whiteboard-shape.service.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { CanvasWhiteboardShape } from "./canvas-whiteboard-shape";
22
import { CanvasWhiteboardShapeOptions } from "./canvas-whiteboard-shape-options";
33
import { CanvasWhiteboardPoint } from "../canvas-whiteboard-point";
4-
import { Observable } from "rxjs/index";
4+
import { Observable } from "rxjs";
55
export interface INewCanvasWhiteboardShape<T extends CanvasWhiteboardShape> {
66
new (positionPoint?: CanvasWhiteboardPoint, options?: CanvasWhiteboardShapeOptions, ...args: any[]): T;
77
}

0 commit comments

Comments
 (0)