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

Commit

Permalink
Merge pull request #55 from preeco-privacy/angular9
Browse files Browse the repository at this point in the history
Upgrade Angular 9
  • Loading branch information
Peshou authored Mar 11, 2020
2 parents 2701d31 + cbaef4e commit 4e3c5a8
Show file tree
Hide file tree
Showing 29 changed files with 1,535 additions and 767 deletions.
316 changes: 227 additions & 89 deletions dist/bundles/ng2-canvas-whiteboard.umd.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/bundles/ng2-canvas-whiteboard.umd.min.js

Large diffs are not rendered by default.

307 changes: 224 additions & 83 deletions dist/modules/ng2-canvas-whiteboard.es5.js

Large diffs are not rendered by default.

352 changes: 256 additions & 96 deletions dist/modules/ng2-canvas-whiteboard.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ng2-canvas-whiteboard.metadata.json

Large diffs are not rendered by default.

34 changes: 19 additions & 15 deletions dist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"angular4",
"angular5",
"angular6",
"angular7",
"angular8",
"angular9",
"canvas",
"drawing",
"touch drawing",
Expand All @@ -44,29 +47,30 @@
"lodash": "4.17.11"
},
"devDependencies": {
"@angular/animations": "^6.0.0",
"@angular/common": "^6.0.0",
"@angular/compiler": "^6.0.0",
"@angular/compiler-cli": "^6.0.0",
"@angular/core": "^6.0.0",
"@angular/platform-browser": "^6.0.0",
"@angular/platform-browser-dynamic": "^6.0.0",
"@angular/platform-server": "^6.0.0",
"@types/lodash": "4.14.116",
"@types/node": "7.0.10",
"@angular/animations": "^9.0.1",
"@angular/common": "^9.0.1",
"@angular/compiler": "^9.0.1",
"@angular/compiler-cli": "^9.0.1",
"@angular/core": "^9.0.1",
"@angular/platform-browser": "^9.0.1",
"@angular/platform-browser-dynamic": "^9.0.1",
"@angular/platform-server": "^9.0.1",
"@types/lodash": "4.14.149",
"@types/node": "13.7.2",
"chalk": "1.1.3",
"core-js": "2.4.1",
"reflect-metadata": "0.1.10",
"core-js": "^3.6.4",
"reflect-metadata": "^0.1.13",
"rollup": "0.41.6",
"rxjs": "^6.1.0",
"rxjs": "^6.5.4",
"shelljs": "0.7.7",
"sorcery": "0.10.0",
"ts-helpers": "1.1.2",
"ts-loader": "2.0.3",
"typescript": "2.7.2",
"tsickle": "^0.38.0",
"typescript": "^3.7.5",
"uglify-js": "^2.8.15",
"webpack": "2.3.1",
"yargs": "7.0.2",
"zone.js": "^0.8.26"
"zone.js": "^0.10.2"
}
}
2 changes: 1 addition & 1 deletion dist/src/canvas-whiteboard-update.model.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CanvasWhiteboardShapeOptions } from "./shapes/canvas-whiteboard-shape-o
export declare enum CanvasWhiteboardUpdateType {
START = 0,
DRAG = 1,
STOP = 2,
STOP = 2
}
export declare class CanvasWhiteboardUpdate {
x: number;
Expand Down
61 changes: 31 additions & 30 deletions dist/src/canvas-whiteboard.component.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
options: CanvasWhiteboardOptions;
batchUpdateTimeoutDuration: number;
private _imageUrl;
imageUrl: string;
set imageUrl(imageUrl: string);
get imageUrl(): string;
aspectRatio: number;
drawButtonClass: string;
clearButtonClass: string;
Expand Down Expand Up @@ -94,28 +95,28 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
*
* @param options
*/
private _initInputsFromOptions(options);
private _isNullOrUndefined(property);
private _initInputsFromOptions;
private _isNullOrUndefined;
/**
* Init global window listeners like resize and keydown
*/
private _initCanvasEventListeners();
private _initCanvasEventListeners;
/**
* Subscribes to new signals in the canvas whiteboard service and executes methods accordingly
* Because of circular publishing and subscribing, the canvas methods do not use the service when
* local actions are completed (Ex. clicking undo from the button inside this component)
*/
private _initCanvasServiceObservables();
private _initCanvasServiceObservables;
/**
* Calculate the canvas width and height from it's parent container width and height (use aspect ratio if needed)
*/
private _calculateCanvasWidthAndHeight();
private _calculateCanvasWidthAndHeight;
/**
* Load an image and draw it on the canvas (if an image exists)
* @param callbackFn A function that is called after the image loading is finished
* @return Emits a value when the image has been loaded.
*/
private _loadImage(callbackFn?);
private _loadImage;
/**
* Sends a notification after clearing the canvas
* This method should only be called from the clear button in this component since it will emit an clear event
Expand All @@ -131,14 +132,14 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
* It calls a callback function after redrawing
* @param callbackFn
*/
private _removeCanvasData(callbackFn?);
private _removeCanvasData;
/**
* Clears the canvas and redraws the image if the url exists.
* @param callbackFn A function that is called after the background is redrawn
* @return Emits a value when the clearing is finished
*/
private _redrawBackground(callbackFn?);
private _drawStartingColor();
private _redrawBackground;
private _drawStartingColor;
/**
* @deprecated Use getDrawingEnabled(): boolean
*/
Expand Down Expand Up @@ -193,7 +194,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
* This method takes an UUID for an update, and redraws the canvas by making all updates with that uuid invisible
* @param updateUUID
*/
private _undoCanvas(updateUUID);
private _undoCanvas;
/**
* This method is invoked by the redo button on the canvas screen
* It calls the global redo method and emits a notification after redoing
Expand All @@ -211,7 +212,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
* This method takes an UUID for an update, and redraws the canvas by making all updates with that uuid visible
* @param updateUUID
*/
private _redoCanvas(updateUUID);
private _redoCanvas;
/**
* Catches the Mouse and Touch events made on the canvas.
* If drawing is disabled (If an image exists but it's not loaded, or the user did not click Draw),
Expand All @@ -235,15 +236,15 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
* If it is not a touch event, use the original mouse event received
* @param eventData
*/
private _getCanvasEventPosition(eventData);
private _getCanvasEventPosition;
/**
* The update coordinates on the canvas are mapped so that all receiving ends
* can reverse the mapping and get the same position as the one that
* was drawn on this update.
*
* @param update The CanvasWhiteboardUpdate object.
*/
private _prepareToSendUpdate(update);
private _prepareToSendUpdate;
/**
* Catches the Key Up events made on the canvas.
* If the ctrlKey or commandKey(macOS) was held and the keyCode is 90 (z), an undo action will be performed
Expand All @@ -252,15 +253,15 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
*
* @param event The event that occurred.
*/
private _canvasKeyDown(event);
private _canvasKeyDown;
/**
* On window resize, recalculate the canvas dimensions and redraw the history
*/
private _redrawCanvasOnResize();
private _redrawCanvasOnResize;
/**
* Redraw the saved history after resetting the canvas state
*/
private _redrawHistory();
private _redrawHistory;
/**
* Draws a CanvasWhiteboardUpdate object on the canvas.
* The coordinates are first reverse mapped so that they can be drawn in the proper place. The update
Expand All @@ -273,15 +274,15 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
*
* @param update The update object.
*/
private _draw(update);
private _drawIncompleteShapes();
private _swapCompletedShapeToActualCanvas(shape);
private _resetIncompleteShapeCanvas();
private _draw;
private _drawIncompleteShapes;
private _swapCompletedShapeToActualCanvas;
private _resetIncompleteShapeCanvas;
/**
* Delete everything from the screen, redraw the background, and then redraw all the shapes from the shapesMap
*/
drawAllShapes(): void;
private _addCurrentShapeDataToAnUpdate(update);
private _addCurrentShapeDataToAnUpdate;
generateShapePreviewOptions(): CanvasWhiteboardShapeOptions;
/**
* Sends the update to all receiving ends as an Event emit. This is done as a batch operation (meaning
Expand All @@ -291,7 +292,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
* @param update The update object.
* @return Emits an Array of Updates when the batch.
*/
private _prepareUpdateForBatchDispatch(update);
private _prepareUpdateForBatchDispatch;
/**
* Draws an Array of Updates on the canvas.
*
Expand All @@ -301,7 +302,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
/**
* Draw any missing updates that were received before the image was loaded
*/
private _drawMissingUpdates();
private _drawMissingUpdates;
/**
* Draws an image on the canvas
*
Expand All @@ -314,7 +315,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
* @param offsetX The offsetX if the image size is larger than the canvas (aspect Ratio)
* @param offsetY The offsetY if the image size is larger than the canvas (aspect Ratio)
*/
private _drawImage(context, image, x, y, width, height, offsetX, offsetY);
private _drawImage;
/**
* 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).
* The returned image is in a resolution of 96 dpi.
Expand Down Expand Up @@ -354,7 +355,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
* @param blob
* @param returnedDataType
*/
private _saveCanvasBlob(blob, returnedDataType?);
private _saveCanvasBlob;
/**
* This method generates a canvas url string or a canvas blob with the presented data type
* A callback function is then invoked since the blob creation must be done via a callback
Expand All @@ -371,7 +372,7 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
* @param returnedDataType
*/
saveLocal(returnedDataType?: string): void;
private _generateDataTypeString(returnedDataType);
private _generateDataTypeString;
/**
* Toggles the color picker window, delegating the showColorPicker Input to the ColorPickerComponent.
* If no value is supplied (null/undefined) the current value will be negated and used.
Expand Down Expand Up @@ -400,9 +401,9 @@ export declare class CanvasWhiteboardComponent implements OnInit, AfterViewInit,
* Unsubscribe from a given subscription if it is active
* @param subscription
*/
private _unsubscribe(subscription);
private _generateUUID();
private _random4();
private _unsubscribe;
private _generateUUID;
private _random4;
/**
* Unsubscribe from the service observables
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/src/canvas-whiteboard.service.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CanvasWhiteboardUpdate } from "./canvas-whiteboard-update.model";
import { Observable } from "rxjs/index";
import { Observable } from "rxjs";
export declare class CanvasWhiteboardService {
private _canvasDrawSubject;
canvasDrawSubject$: Observable<CanvasWhiteboardUpdate[]>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ElementRef, EventEmitter } from "@angular/core";
import { CanvasWhiteboardShapeService, INewCanvasWhiteboardShape } from "./canvas-whiteboard-shape.service";
import { CanvasWhiteboardShape } from "./canvas-whiteboard-shape";
import { CanvasWhiteboardShapeOptions } from "./canvas-whiteboard-shape-options";
import { Observable } from "rxjs/index";
import { Observable } from "rxjs";
export declare class CanvasWhiteboardShapeSelectorComponent {
private _elementRef;
private _canvasWhiteboardShapeService;
Expand Down
2 changes: 1 addition & 1 deletion dist/src/shapes/canvas-whiteboard-shape.service.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CanvasWhiteboardShape } from "./canvas-whiteboard-shape";
import { CanvasWhiteboardShapeOptions } from "./canvas-whiteboard-shape-options";
import { CanvasWhiteboardPoint } from "../canvas-whiteboard-point";
import { Observable } from "rxjs/index";
import { Observable } from "rxjs";
export interface INewCanvasWhiteboardShape<T extends CanvasWhiteboardShape> {
new (positionPoint?: CanvasWhiteboardPoint, options?: CanvasWhiteboardShapeOptions, ...args: any[]): T;
}
Expand Down
Loading

0 comments on commit 4e3c5a8

Please sign in to comment.