@syncfusion/ej2-drawings
Advanced tools
Comparing version 27.1.53 to 27.1.55
/*! | ||
* filename: index.d.ts | ||
* version : 27.1.53 | ||
* version : 27.1.55 | ||
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
@@ -5,3 +5,3 @@ { | ||
"_inBundle": false, | ||
"_integrity": "sha512-Qo1C6rFisiBwY5iJXutQHS7X3R+M+Ly1ntFotNUebWhOce9dgZN8SXCnCUOm+prkgs6tQJLcFWOyaYWlomkpkg==", | ||
"_integrity": "sha512-ybMmm9iI/3nTJCkQxsY90QGgcjp53mWnOUpFpY+3SeAMSE9pVZes54YtjNtnIU9o1s55mWdat4gqL+xA96CpAA==", | ||
"_location": "/@syncfusion/ej2-drawings", | ||
@@ -26,3 +26,3 @@ "_phantomChildren": {}, | ||
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-drawings/-/ej2-drawings-20.1.52.tgz", | ||
"_shasum": "e0895e59e0af3884f6525448b93a38e34d8bcd31", | ||
"_shasum": "85aeb274e8d2522c09d362ece765cefc04d86572", | ||
"_spec": "@syncfusion/ej2-drawings@*", | ||
@@ -38,3 +38,3 @@ "_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included", | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~27.1.53", | ||
"@syncfusion/ej2-base": "~27.1.55", | ||
"@syncfusion/ej2-data": "~27.1.52" | ||
@@ -64,4 +64,4 @@ }, | ||
"typings": "index.d.ts", | ||
"version": "27.1.53", | ||
"version": "27.1.55", | ||
"sideEffects": false | ||
} |
@@ -34,6 +34,6 @@ import { PointModel } from './../primitives/point-model'; | ||
/** @private */ | ||
drawImage(canvas: HTMLCanvasElement, obj: ImageAttributes, parentSvg?: SVGSVGElement, fromPalette?: boolean): void; | ||
drawImage(canvas: HTMLCanvasElement, obj: ImageAttributes, parentSvg?: SVGSVGElement, fromPalette?: boolean, annotationCallback?: (annotationID: string) => boolean): void; | ||
/** @private */ | ||
labelAlign(text: TextAttributes, wrapBounds: TextBounds, childNodes: SubTextElement[]): PointModel; | ||
} | ||
export declare function refreshDiagramElements(canvas: HTMLCanvasElement, drawingObjects: DrawingElement[], renderer: DrawingRenderer): void; | ||
export declare function refreshDiagramElements(canvas: HTMLCanvasElement, drawingObjects: DrawingElement[], renderer: DrawingRenderer, annotationCallback?: (annotationID: string) => boolean): void; |
@@ -341,3 +341,3 @@ import { Size } from './../primitives/size'; | ||
}; | ||
CanvasRenderer.prototype.image = function (ctx, image, x, y, width, height, alignOptions) { | ||
CanvasRenderer.prototype.image = function (ctx, image, x, y, width, height, alignOptions, annotationCallback) { | ||
ctx.beginPath(); | ||
@@ -420,5 +420,12 @@ var srcWidth = image.width; | ||
image.onload = function () { | ||
ctx.setTransform(transform_1.a, transform_1.b, transform_1.c, transform_1.d, transform_1.e, transform_1.f); | ||
ctx.clearRect(x, y, width, height); | ||
ctx.drawImage(image, x, y, width, height); | ||
var annotationID = alignOptions.id.split('_')[0]; | ||
var annotationObject = true; | ||
if (annotationCallback !== undefined && !annotationCallback(annotationID)) { | ||
annotationObject = false; | ||
} | ||
if (annotationObject) { | ||
ctx.setTransform(transform_1.a, transform_1.b, transform_1.c, transform_1.d, transform_1.e, transform_1.f); | ||
ctx.clearRect(x, y, width, height); | ||
ctx.drawImage(image, x, y, width, height); | ||
} | ||
}; | ||
@@ -430,3 +437,3 @@ } | ||
// text utility | ||
CanvasRenderer.prototype.loadImage = function (ctx, obj, canvas, pivotX, pivotY) { | ||
CanvasRenderer.prototype.loadImage = function (ctx, obj, canvas, pivotX, pivotY, annotationCallback) { | ||
this.rotateContext(canvas, obj.angle, pivotX, pivotY); | ||
@@ -441,6 +448,6 @@ var image; | ||
} | ||
this.image(ctx, image, obj.x, obj.y, obj.width, obj.height, obj); | ||
this.image(ctx, image, obj.x, obj.y, obj.width, obj.height, obj, annotationCallback); | ||
}; | ||
/** @private */ | ||
CanvasRenderer.prototype.drawImage = function (canvas, obj, parentSvg, fromPalette) { | ||
CanvasRenderer.prototype.drawImage = function (canvas, obj, parentSvg, fromPalette, annotationCallback) { | ||
var _this = this; | ||
@@ -466,3 +473,3 @@ if (obj.visible) { | ||
if (!fromPalette) { | ||
this.loadImage(ctx_1, obj, canvas, pivotX_1, pivotY_1); | ||
this.loadImage(ctx_1, obj, canvas, pivotX_1, pivotY_1, annotationCallback); | ||
} | ||
@@ -508,6 +515,6 @@ else { | ||
export { CanvasRenderer }; | ||
export function refreshDiagramElements(canvas, drawingObjects, renderer) { | ||
export function refreshDiagramElements(canvas, drawingObjects, renderer, annotationCallback) { | ||
for (var i = 0; i < drawingObjects.length; i++) { | ||
renderer.renderElement(drawingObjects[parseInt(i.toString(), 10)], canvas, undefined); | ||
renderer.renderElement(drawingObjects[parseInt(i.toString(), 10)], canvas, undefined, undefined, undefined, undefined, undefined, undefined, annotationCallback); | ||
} | ||
} |
@@ -24,5 +24,5 @@ import { DrawingElement } from '../core/elements/drawing-element'; | ||
/** @private */ | ||
renderElement(element: DrawingElement, canvas: HTMLCanvasElement | SVGElement, htmlLayer: HTMLElement, transform?: Transforms, parentSvg?: SVGSVGElement, createParent?: boolean, fromPalette?: boolean, indexValue?: number): void; | ||
renderElement(element: DrawingElement, canvas: HTMLCanvasElement | SVGElement, htmlLayer: HTMLElement, transform?: Transforms, parentSvg?: SVGSVGElement, createParent?: boolean, fromPalette?: boolean, indexValue?: number, annotationCallback?: (annotationID: string) => boolean): void; | ||
/** @private */ | ||
renderImageElement(element: ImageElement, canvas: HTMLCanvasElement | SVGElement, transform?: Transforms, parentSvg?: SVGSVGElement, fromPalette?: boolean): void; | ||
renderImageElement(element: ImageElement, canvas: HTMLCanvasElement | SVGElement, transform?: Transforms, parentSvg?: SVGSVGElement, fromPalette?: boolean, annotationCallback?: (annotationID: string) => boolean): void; | ||
/** @private */ | ||
@@ -33,3 +33,3 @@ renderPathElement(element: PathElement, canvas: HTMLCanvasElement | SVGElement, transform?: Transforms, parentSvg?: SVGSVGElement, fromPalette?: boolean): void; | ||
/** @private */ | ||
renderContainer(group: Container, canvas: HTMLCanvasElement | SVGElement, htmlLayer: HTMLElement, transform?: Transforms, parentSvg?: SVGSVGElement, createParent?: boolean, fromPalette?: boolean, indexValue?: number): void; | ||
renderContainer(group: Container, canvas: HTMLCanvasElement | SVGElement, htmlLayer: HTMLElement, transform?: Transforms, parentSvg?: SVGSVGElement, createParent?: boolean, fromPalette?: boolean, indexValue?: number, annotationCallback?: (annotationID: string) => boolean): void; | ||
/** @private */ | ||
@@ -36,0 +36,0 @@ renderRect(element: DrawingElement, canvas: HTMLCanvasElement | SVGElement, transform?: Transforms, parentSvg?: SVGSVGElement): void; |
@@ -30,10 +30,10 @@ import { PathElement } from '../core/elements/path-element'; | ||
/** @private */ | ||
DrawingRenderer.prototype.renderElement = function (element, canvas, htmlLayer, transform, parentSvg, createParent, fromPalette, indexValue) { | ||
DrawingRenderer.prototype.renderElement = function (element, canvas, htmlLayer, transform, parentSvg, createParent, fromPalette, indexValue, annotationCallback) { | ||
var isElement = true; | ||
if (element instanceof Container) { | ||
isElement = false; | ||
this.renderContainer(element, canvas, htmlLayer, transform, parentSvg, createParent, fromPalette, indexValue); | ||
this.renderContainer(element, canvas, htmlLayer, transform, parentSvg, createParent, fromPalette, indexValue, annotationCallback); | ||
} | ||
else if (element instanceof ImageElement) { | ||
this.renderImageElement(element, canvas, transform, parentSvg, fromPalette); | ||
this.renderImageElement(element, canvas, transform, parentSvg, fromPalette, annotationCallback); | ||
} | ||
@@ -51,3 +51,3 @@ else if (element instanceof PathElement) { | ||
/** @private */ | ||
DrawingRenderer.prototype.renderImageElement = function (element, canvas, transform, parentSvg, fromPalette) { | ||
DrawingRenderer.prototype.renderImageElement = function (element, canvas, transform, parentSvg, fromPalette, annotationCallback) { | ||
var options = this.getBaseAttributes(element, transform); | ||
@@ -105,3 +105,3 @@ options.cornerRadius = 0; | ||
options.printID = element.printID; | ||
this.renderer.drawImage(canvas, options, parentSvg, fromPalette); | ||
this.renderer.drawImage(canvas, options, parentSvg, fromPalette, annotationCallback); | ||
}; | ||
@@ -146,3 +146,3 @@ /** @private */ | ||
/** @private */ | ||
DrawingRenderer.prototype.renderContainer = function (group, canvas, htmlLayer, transform, parentSvg, createParent, fromPalette, indexValue) { | ||
DrawingRenderer.prototype.renderContainer = function (group, canvas, htmlLayer, transform, parentSvg, createParent, fromPalette, indexValue, annotationCallback) { | ||
transform = { tx: 0, ty: 0, scale: 1 }; | ||
@@ -159,3 +159,3 @@ var svgParent = { svg: parentSvg, g: canvas }; | ||
var child = _a[_i]; | ||
this.renderElement(child, parentG || canvas, htmlLayer, transform, parentSvg, true, fromPalette, indexValue); | ||
this.renderElement(child, parentG || canvas, htmlLayer, transform, parentSvg, true, fromPalette, indexValue, annotationCallback); | ||
} | ||
@@ -162,0 +162,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2108757
16846