ngx-image-cropper 6.3.4 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/component/image-cropper.component.mjs +32 -9
- package/esm2020/lib/interfaces/cropper-options.interface.mjs +1 -1
- package/esm2020/lib/interfaces/cropper.settings.mjs +2 -1
- package/esm2020/lib/interfaces/image-cropped-event.interface.mjs +1 -1
- package/esm2020/lib/interfaces/loaded-image.interface.mjs +1 -1
- package/esm2020/lib/services/crop.service.mjs +21 -9
- package/esm2020/lib/services/load-image.service.mjs +43 -40
- package/esm2020/lib/utils/exif.utils.mjs +7 -17
- package/fesm2015/ngx-image-cropper.mjs +103 -72
- package/fesm2015/ngx-image-cropper.mjs.map +1 -1
- package/fesm2020/ngx-image-cropper.mjs +100 -71
- package/fesm2020/ngx-image-cropper.mjs.map +1 -1
- package/lib/component/image-cropper.component.d.ts +6 -1
- package/lib/interfaces/cropper-options.interface.d.ts +1 -0
- package/lib/interfaces/cropper.settings.d.ts +2 -1
- package/lib/interfaces/image-cropped-event.interface.d.ts +2 -0
- package/lib/interfaces/loaded-image.interface.d.ts +2 -2
- package/lib/services/crop.service.d.ts +3 -1
- package/lib/services/load-image.service.d.ts +5 -3
- package/lib/utils/exif.utils.d.ts +1 -1
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ class CropperSettings {
|
|
|
9
9
|
constructor() {
|
|
10
10
|
// From options
|
|
11
11
|
this.format = 'png';
|
|
12
|
+
this.output = 'blob';
|
|
12
13
|
this.maintainAspectRatio = true;
|
|
13
14
|
this.transform = {};
|
|
14
15
|
this.aspectRatio = 1;
|
|
@@ -185,7 +186,7 @@ function percentage(percent, totalValue) {
|
|
|
185
186
|
}
|
|
186
187
|
|
|
187
188
|
class CropService {
|
|
188
|
-
crop(sourceImage, loadedImage, cropper, settings) {
|
|
189
|
+
crop(sourceImage, loadedImage, cropper, settings, output) {
|
|
189
190
|
const imagePosition = this.getImagePosition(sourceImage, loadedImage, cropper, settings);
|
|
190
191
|
const width = imagePosition.x2 - imagePosition.x1;
|
|
191
192
|
const height = imagePosition.y2 - imagePosition.y1;
|
|
@@ -208,24 +209,38 @@ class CropService {
|
|
|
208
209
|
ctx.translate(-imagePosition.x1 / scaleX, -imagePosition.y1 / scaleY);
|
|
209
210
|
ctx.rotate((settings.transform.rotate || 0) * Math.PI / 180);
|
|
210
211
|
ctx.drawImage(transformedImage.image, -transformedImage.size.width / 2, -transformedImage.size.height / 2);
|
|
211
|
-
const
|
|
212
|
+
const result = {
|
|
212
213
|
width, height,
|
|
213
214
|
imagePosition,
|
|
214
215
|
cropperPosition: Object.assign({}, cropper)
|
|
215
216
|
};
|
|
216
217
|
if (settings.containWithinAspectRatio) {
|
|
217
|
-
|
|
218
|
+
result.offsetImagePosition = this.getOffsetImagePosition(sourceImage, loadedImage, cropper, settings);
|
|
218
219
|
}
|
|
219
220
|
const resizeRatio = this.getResizeRatio(width, height, settings);
|
|
220
221
|
if (resizeRatio !== 1) {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
? Math.round(
|
|
222
|
+
result.width = Math.round(width * resizeRatio);
|
|
223
|
+
result.height = settings.maintainAspectRatio
|
|
224
|
+
? Math.round(result.width / settings.aspectRatio)
|
|
224
225
|
: Math.round(height * resizeRatio);
|
|
225
|
-
resizeCanvas(cropCanvas,
|
|
226
|
+
resizeCanvas(cropCanvas, result.width, result.height);
|
|
226
227
|
}
|
|
227
|
-
output
|
|
228
|
-
|
|
228
|
+
if (output === 'blob') {
|
|
229
|
+
return this.cropToBlob(result, cropCanvas, settings);
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
result.base64 = cropCanvas.toDataURL('image/' + settings.format, this.getQuality(settings));
|
|
233
|
+
return result;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
cropToBlob(output, cropCanvas, settings) {
|
|
237
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
238
|
+
output.blob = yield new Promise(resolve => cropCanvas.toBlob(resolve, settings.format, this.getQuality(settings)));
|
|
239
|
+
if (output.blob) {
|
|
240
|
+
output.objectUrl = URL.createObjectURL(output.blob);
|
|
241
|
+
}
|
|
242
|
+
return output;
|
|
243
|
+
});
|
|
229
244
|
}
|
|
230
245
|
getCanvasTranslate(sourceImage, loadedImage, settings) {
|
|
231
246
|
if (settings.transform.translateUnit === 'px') {
|
|
@@ -538,11 +553,11 @@ function supportsAutomaticRotation() {
|
|
|
538
553
|
img.src = testAutoOrientationImageURL;
|
|
539
554
|
});
|
|
540
555
|
}
|
|
541
|
-
function getTransformationsFromExifData(
|
|
542
|
-
if (typeof
|
|
543
|
-
|
|
556
|
+
function getTransformationsFromExifData(exifRotationOrArrayBuffer) {
|
|
557
|
+
if (typeof exifRotationOrArrayBuffer === 'object') {
|
|
558
|
+
exifRotationOrArrayBuffer = getExifRotation(exifRotationOrArrayBuffer);
|
|
544
559
|
}
|
|
545
|
-
switch (
|
|
560
|
+
switch (exifRotationOrArrayBuffer) {
|
|
546
561
|
case 2:
|
|
547
562
|
return { rotate: 0, flip: true };
|
|
548
563
|
case 3:
|
|
@@ -561,8 +576,8 @@ function getTransformationsFromExifData(exifRotationOrBase64Image) {
|
|
|
561
576
|
return { rotate: 0, flip: false };
|
|
562
577
|
}
|
|
563
578
|
}
|
|
564
|
-
function getExifRotation(
|
|
565
|
-
const view = new DataView(
|
|
579
|
+
function getExifRotation(arrayBuffer) {
|
|
580
|
+
const view = new DataView(arrayBuffer);
|
|
566
581
|
if (view.getUint16(0, false) !== 0xFFD8) {
|
|
567
582
|
return -2;
|
|
568
583
|
}
|
|
@@ -596,78 +611,67 @@ function getExifRotation(imageBase64) {
|
|
|
596
611
|
}
|
|
597
612
|
return -1;
|
|
598
613
|
}
|
|
599
|
-
function base64ToArrayBuffer(imageBase64) {
|
|
600
|
-
imageBase64 = imageBase64.replace(/^data\:([^\;]+)\;base64,/gmi, '');
|
|
601
|
-
const binaryString = atob(imageBase64);
|
|
602
|
-
const len = binaryString.length;
|
|
603
|
-
const bytes = new Uint8Array(len);
|
|
604
|
-
for (let i = 0; i < len; i++) {
|
|
605
|
-
bytes[i] = binaryString.charCodeAt(i);
|
|
606
|
-
}
|
|
607
|
-
return bytes.buffer;
|
|
608
|
-
}
|
|
609
614
|
|
|
610
615
|
class LoadImageService {
|
|
611
616
|
constructor() {
|
|
612
617
|
this.autoRotateSupported = supportsAutomaticRotation();
|
|
613
618
|
}
|
|
614
619
|
loadImageFile(file, cropperSettings) {
|
|
615
|
-
return
|
|
616
|
-
|
|
617
|
-
fileReader.onload = (event) => {
|
|
618
|
-
this.loadImage(event.target.result, file.type, cropperSettings)
|
|
619
|
-
.then(resolve)
|
|
620
|
-
.catch(reject);
|
|
621
|
-
};
|
|
622
|
-
fileReader.readAsDataURL(file);
|
|
623
|
-
});
|
|
620
|
+
return file.arrayBuffer()
|
|
621
|
+
.then(arrayBuffer => this.checkImageTypeAndLoadImageFromArrayBuffer(arrayBuffer, file.type, cropperSettings));
|
|
624
622
|
}
|
|
625
|
-
|
|
623
|
+
checkImageTypeAndLoadImageFromArrayBuffer(arrayBuffer, imageType, cropperSettings) {
|
|
626
624
|
if (!this.isValidImageType(imageType)) {
|
|
627
625
|
return Promise.reject(new Error('Invalid image type'));
|
|
628
626
|
}
|
|
629
|
-
return this.
|
|
627
|
+
return this.loadImageFromArrayBuffer(arrayBuffer, cropperSettings);
|
|
630
628
|
}
|
|
631
629
|
isValidImageType(type) {
|
|
632
630
|
return /image\/(png|jpg|jpeg|bmp|gif|tiff|webp|x-icon|vnd.microsoft.icon)/.test(type);
|
|
633
631
|
}
|
|
634
632
|
loadImageFromURL(url, cropperSettings) {
|
|
635
|
-
return
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
img.onload = () => {
|
|
639
|
-
const canvas = document.createElement('canvas');
|
|
640
|
-
const context = canvas.getContext('2d');
|
|
641
|
-
canvas.width = img.width;
|
|
642
|
-
canvas.height = img.height;
|
|
643
|
-
context === null || context === void 0 ? void 0 : context.drawImage(img, 0, 0);
|
|
644
|
-
this.loadBase64Image(canvas.toDataURL(), cropperSettings).then(resolve);
|
|
645
|
-
};
|
|
646
|
-
img.crossOrigin = 'anonymous';
|
|
647
|
-
img.src = url;
|
|
648
|
-
});
|
|
633
|
+
return fetch(url)
|
|
634
|
+
.then(res => res.arrayBuffer())
|
|
635
|
+
.then(buffer => this.loadImageFromArrayBuffer(buffer, cropperSettings));
|
|
649
636
|
}
|
|
650
637
|
loadBase64Image(imageBase64, cropperSettings) {
|
|
638
|
+
const arrayBuffer = this.base64ToArrayBuffer(imageBase64);
|
|
639
|
+
return this.loadImageFromArrayBuffer(arrayBuffer, cropperSettings);
|
|
640
|
+
}
|
|
641
|
+
base64ToArrayBuffer(imageBase64) {
|
|
642
|
+
imageBase64 = imageBase64.replace(/^data\:([^\;]+)\;base64,/gmi, '');
|
|
643
|
+
const binaryString = atob(imageBase64);
|
|
644
|
+
const len = binaryString.length;
|
|
645
|
+
const bytes = new Uint8Array(len);
|
|
646
|
+
for (let i = 0; i < len; i++) {
|
|
647
|
+
bytes[i] = binaryString.charCodeAt(i);
|
|
648
|
+
}
|
|
649
|
+
return bytes.buffer;
|
|
650
|
+
}
|
|
651
|
+
loadImageFromArrayBuffer(arrayBuffer, cropperSettings) {
|
|
651
652
|
return new Promise((resolve, reject) => {
|
|
653
|
+
const blob = new Blob([arrayBuffer]);
|
|
654
|
+
const objectUrl = URL.createObjectURL(blob);
|
|
652
655
|
const originalImage = new Image();
|
|
653
656
|
originalImage.onload = () => resolve({
|
|
654
657
|
originalImage,
|
|
655
|
-
|
|
658
|
+
originalObjectUrl: objectUrl,
|
|
659
|
+
originalArrayBuffer: arrayBuffer
|
|
656
660
|
});
|
|
657
661
|
originalImage.onerror = reject;
|
|
658
|
-
originalImage.src =
|
|
659
|
-
}).then((res) => this.
|
|
662
|
+
originalImage.src = objectUrl;
|
|
663
|
+
}).then((res) => this.transformImageFromArrayBuffer(res, cropperSettings));
|
|
660
664
|
}
|
|
661
|
-
|
|
665
|
+
transformImageFromArrayBuffer(res, cropperSettings) {
|
|
662
666
|
return __awaiter(this, void 0, void 0, function* () {
|
|
663
667
|
const autoRotate = yield this.autoRotateSupported;
|
|
664
|
-
const exifTransform = yield getTransformationsFromExifData(autoRotate ? -1 : res.
|
|
668
|
+
const exifTransform = yield getTransformationsFromExifData(autoRotate ? -1 : res.originalArrayBuffer);
|
|
665
669
|
if (!res.originalImage || !res.originalImage.complete) {
|
|
666
670
|
return Promise.reject(new Error('No image loaded'));
|
|
667
671
|
}
|
|
668
672
|
const loadedImage = {
|
|
669
673
|
original: {
|
|
670
|
-
|
|
674
|
+
objectUrl: res.originalObjectUrl,
|
|
671
675
|
image: res.originalImage,
|
|
672
676
|
size: {
|
|
673
677
|
width: res.originalImage.naturalWidth,
|
|
@@ -689,12 +693,12 @@ class LoadImageService {
|
|
|
689
693
|
if (canvasRotation === 0 && !loadedImage.exifTransform.flip && !cropperSettings.containWithinAspectRatio) {
|
|
690
694
|
return {
|
|
691
695
|
original: {
|
|
692
|
-
|
|
696
|
+
objectUrl: loadedImage.original.objectUrl,
|
|
693
697
|
image: loadedImage.original.image,
|
|
694
698
|
size: Object.assign({}, originalSize)
|
|
695
699
|
},
|
|
696
700
|
transformed: {
|
|
697
|
-
|
|
701
|
+
objectUrl: loadedImage.original.objectUrl,
|
|
698
702
|
image: loadedImage.original.image,
|
|
699
703
|
size: Object.assign({}, originalSize)
|
|
700
704
|
},
|
|
@@ -709,16 +713,20 @@ class LoadImageService {
|
|
|
709
713
|
ctx === null || ctx === void 0 ? void 0 : ctx.setTransform(loadedImage.exifTransform.flip ? -1 : 1, 0, 0, 1, canvas.width / 2, canvas.height / 2);
|
|
710
714
|
ctx === null || ctx === void 0 ? void 0 : ctx.rotate(Math.PI * (canvasRotation / 2));
|
|
711
715
|
ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(loadedImage.original.image, -originalSize.width / 2, -originalSize.height / 2);
|
|
712
|
-
const
|
|
713
|
-
|
|
716
|
+
const blob = yield new Promise(resolve => canvas.toBlob(resolve, cropperSettings.format));
|
|
717
|
+
if (!blob) {
|
|
718
|
+
throw new Error('Failed to get Blob for transformed image.');
|
|
719
|
+
}
|
|
720
|
+
const objectUrl = URL.createObjectURL(blob);
|
|
721
|
+
const transformedImage = yield this.loadImageFromObjectUrl(objectUrl);
|
|
714
722
|
return {
|
|
715
723
|
original: {
|
|
716
|
-
|
|
724
|
+
objectUrl: loadedImage.original.objectUrl,
|
|
717
725
|
image: loadedImage.original.image,
|
|
718
726
|
size: Object.assign({}, originalSize)
|
|
719
727
|
},
|
|
720
728
|
transformed: {
|
|
721
|
-
|
|
729
|
+
objectUrl: objectUrl,
|
|
722
730
|
image: transformedImage,
|
|
723
731
|
size: {
|
|
724
732
|
width: transformedImage.width,
|
|
@@ -729,12 +737,12 @@ class LoadImageService {
|
|
|
729
737
|
};
|
|
730
738
|
});
|
|
731
739
|
}
|
|
732
|
-
|
|
740
|
+
loadImageFromObjectUrl(objectUrl) {
|
|
733
741
|
return new Promise(((resolve, reject) => {
|
|
734
742
|
const image = new Image();
|
|
735
743
|
image.onload = () => resolve(image);
|
|
736
744
|
image.onerror = reject;
|
|
737
|
-
image.src =
|
|
745
|
+
image.src = objectUrl;
|
|
738
746
|
}));
|
|
739
747
|
}
|
|
740
748
|
getTransformedSize(originalSize, exifTransform, cropperSettings) {
|
|
@@ -794,6 +802,7 @@ class ImageCropperComponent {
|
|
|
794
802
|
};
|
|
795
803
|
this.moveTypes = MoveTypes;
|
|
796
804
|
this.imageVisible = false;
|
|
805
|
+
this.output = this.settings.output;
|
|
797
806
|
this.format = this.settings.format;
|
|
798
807
|
this.transform = {};
|
|
799
808
|
this.maintainAspectRatio = this.settings.maintainAspectRatio;
|
|
@@ -964,7 +973,7 @@ class ImageCropperComponent {
|
|
|
964
973
|
}
|
|
965
974
|
setLoadedImage(loadedImage) {
|
|
966
975
|
this.loadedImage = loadedImage;
|
|
967
|
-
this.safeImgDataUrl = this.sanitizer.bypassSecurityTrustResourceUrl(loadedImage.transformed.
|
|
976
|
+
this.safeImgDataUrl = this.sanitizer.bypassSecurityTrustResourceUrl(loadedImage.transformed.objectUrl);
|
|
968
977
|
this.cd.markForCheck();
|
|
969
978
|
}
|
|
970
979
|
loadImageError(error) {
|
|
@@ -1220,18 +1229,38 @@ class ImageCropperComponent {
|
|
|
1220
1229
|
}
|
|
1221
1230
|
doAutoCrop() {
|
|
1222
1231
|
if (this.autoCrop) {
|
|
1223
|
-
this.crop();
|
|
1232
|
+
void this.crop();
|
|
1224
1233
|
}
|
|
1225
1234
|
}
|
|
1226
|
-
crop() {
|
|
1235
|
+
crop(output = this.settings.output) {
|
|
1227
1236
|
var _a, _b;
|
|
1228
1237
|
if (((_b = (_a = this.loadedImage) === null || _a === void 0 ? void 0 : _a.transformed) === null || _b === void 0 ? void 0 : _b.image) != null) {
|
|
1229
1238
|
this.startCropImage.emit();
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
this.imageCropped.emit(output);
|
|
1239
|
+
if (output === 'blob') {
|
|
1240
|
+
return this.cropToBlob();
|
|
1233
1241
|
}
|
|
1234
|
-
|
|
1242
|
+
else if (output === 'base64') {
|
|
1243
|
+
return this.cropToBase64();
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
return null;
|
|
1247
|
+
}
|
|
1248
|
+
cropToBlob() {
|
|
1249
|
+
const result = this.cropService.crop(this.sourceImage, this.loadedImage, this.cropper, this.settings, 'blob');
|
|
1250
|
+
if (result) {
|
|
1251
|
+
return Promise.resolve(result)
|
|
1252
|
+
.then((output) => {
|
|
1253
|
+
this.imageCropped.emit(output);
|
|
1254
|
+
return result;
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
return null;
|
|
1258
|
+
}
|
|
1259
|
+
cropToBase64() {
|
|
1260
|
+
const result = this.cropService.crop(this.sourceImage, this.loadedImage, this.cropper, this.settings, 'base64');
|
|
1261
|
+
if (result) {
|
|
1262
|
+
this.imageCropped.emit(result);
|
|
1263
|
+
return result;
|
|
1235
1264
|
}
|
|
1236
1265
|
return null;
|
|
1237
1266
|
}
|
|
@@ -1241,7 +1270,7 @@ class ImageCropperComponent {
|
|
|
1241
1270
|
}
|
|
1242
1271
|
}
|
|
1243
1272
|
ImageCropperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ImageCropperComponent, deps: [{ token: CropService }, { token: CropperPositionService }, { token: LoadImageService }, { token: i4.DomSanitizer }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1244
|
-
ImageCropperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ImageCropperComponent, selector: "image-cropper", inputs: { imageChangedEvent: "imageChangedEvent", imageURL: "imageURL", imageBase64: "imageBase64", imageFile: "imageFile", imageAltText: "imageAltText", format: "format", transform: "transform", maintainAspectRatio: "maintainAspectRatio", aspectRatio: "aspectRatio", resetCropOnAspectRatioChange: "resetCropOnAspectRatioChange", resizeToWidth: "resizeToWidth", resizeToHeight: "resizeToHeight", cropperMinWidth: "cropperMinWidth", cropperMinHeight: "cropperMinHeight", cropperMaxHeight: "cropperMaxHeight", cropperMaxWidth: "cropperMaxWidth", cropperStaticWidth: "cropperStaticWidth", cropperStaticHeight: "cropperStaticHeight", canvasRotation: "canvasRotation", initialStepSize: "initialStepSize", roundCropper: "roundCropper", onlyScaleDown: "onlyScaleDown", imageQuality: "imageQuality", autoCrop: "autoCrop", backgroundColor: "backgroundColor", containWithinAspectRatio: "containWithinAspectRatio", hideResizeSquares: "hideResizeSquares", allowMoveImage: "allowMoveImage", cropper: "cropper", alignImage: "alignImage", disabled: "disabled", hidden: "hidden" }, outputs: { imageCropped: "imageCropped", startCropImage: "startCropImage", imageLoaded: "imageLoaded", cropperReady: "cropperReady", loadImageFailed: "loadImageFailed", transformChange: "transformChange" }, host: { listeners: { "window:resize": "onResize()", "document:mousemove": "moveImg($event)", "document:touchmove": "moveImg($event)", "document:mouseup": "moveStop()", "document:touchend": "moveStop()" }, properties: { "style.text-align": "this.alignImage", "class.disabled": "this.disabled", "class.ngx-ix-hidden": "this.hidden" } }, viewQueries: [{ propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true, static: true }, { propertyName: "sourceImage", first: true, predicate: ["sourceImage"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n [style.background]=\"imageVisible && backgroundColor\"\n #wrapper\n>\n <img\n #sourceImage\n class=\"ngx-ic-source-image\"\n *ngIf=\"safeImgDataUrl\"\n [src]=\"safeImgDataUrl\"\n [style.visibility]=\"imageVisible ? 'visible' : 'hidden'\"\n [style.transform]=\"safeTransformStyle\"\n [class.ngx-ic-draggable]=\"!disabled && allowMoveImage\"\n [attr.alt]=\"imageAltText\"\n (load)=\"imageLoadedInView()\"\n (mousedown)=\"startMove($event, moveTypes.Drag)\"\n (touchstart)=\"startMove($event, moveTypes.Drag)\"\n (error)=\"loadImageError($event)\"\n >\n <div\n class=\"ngx-ic-overlay\"\n [style.width.px]=\"maxSize.width\"\n [style.height.px]=\"maxSize.height\"\n [style.margin-left]=\"alignImage === 'center' ? marginLeft : null\"\n ></div>\n <div class=\"ngx-ic-cropper\"\n *ngIf=\"imageVisible\"\n [class.ngx-ic-round]=\"roundCropper\"\n [style.top.px]=\"cropper.y1\"\n [style.left.px]=\"cropper.x1\"\n [style.width.px]=\"cropper.x2 - cropper.x1\"\n [style.height.px]=\"cropper.y2 - cropper.y1\"\n [style.margin-left]=\"alignImage === 'center' ? marginLeft : null\"\n [style.visibility]=\"imageVisible ? 'visible' : 'hidden'\"\n (keydown)=\"keyboardAccess($event)\"\n tabindex=\"0\"\n >\n <div\n (mousedown)=\"startMove($event, moveTypes.Move)\"\n (touchstart)=\"startMove($event, moveTypes.Move)\"\n class=\"ngx-ic-move\">\n </div>\n <ng-container *ngIf=\"!hideResizeSquares\">\n <span class=\"ngx-ic-resize ngx-ic-topleft\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'topleft')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'topleft')\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-top\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-topright\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'topright')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'topright')\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-right\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-bottomright\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'bottomright')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'bottomright')\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-bottom\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-bottomleft\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'bottomleft')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'bottomleft')\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-left\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize-bar ngx-ic-top\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'top')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'top')\">\n </span>\n <span class=\"ngx-ic-resize-bar ngx-ic-right\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'right')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'right')\">\n </span>\n <span class=\"ngx-ic-resize-bar ngx-ic-bottom\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'bottom')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'bottom')\">\n </span>\n <span class=\"ngx-ic-resize-bar ngx-ic-left\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'left')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'left')\">\n </span>\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:flex;position:relative;width:100%;max-width:100%;max-height:100%;overflow:hidden;padding:5px;text-align:center}:host>div{width:100%;position:relative}:host>div img.ngx-ic-source-image{max-width:100%;max-height:100%;transform-origin:center}:host>div img.ngx-ic-source-image.ngx-ic-draggable{user-drag:none;-webkit-user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;cursor:grab}:host .ngx-ic-overlay{position:absolute;pointer-events:none;touch-action:none;outline:var(--cropper-overlay-color, white) solid 100vw;top:0;left:0}:host .ngx-ic-cropper{position:absolute;display:flex;color:#53535c;background:transparent;outline:rgba(255,255,255,.3) solid 100vw;outline:var(--cropper-outline-color, rgba(255, 255, 255, .3)) solid 100vw;touch-action:none}@media (orientation: portrait){:host .ngx-ic-cropper{outline-width:100vh}}:host .ngx-ic-cropper:after{position:absolute;content:\"\";inset:0;pointer-events:none;border:dashed 1px;opacity:.75;color:inherit;z-index:1}:host .ngx-ic-cropper .ngx-ic-move{width:100%;cursor:move;border:1px solid rgba(255,255,255,.5)}:host .ngx-ic-cropper:focus .ngx-ic-move{border-color:#1e90ff;border-width:2px}:host .ngx-ic-cropper .ngx-ic-resize{position:absolute;display:inline-block;line-height:6px;padding:8px;opacity:.85;z-index:1}:host .ngx-ic-cropper .ngx-ic-resize .ngx-ic-square{display:inline-block;background:#53535C;width:6px;height:6px;border:1px solid rgba(255,255,255,.5);box-sizing:content-box}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-topleft{top:-12px;left:-12px;cursor:nwse-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-top{top:-12px;left:calc(50% - 12px);cursor:ns-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-topright{top:-12px;right:-12px;cursor:nesw-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-right{top:calc(50% - 12px);right:-12px;cursor:ew-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-bottomright{bottom:-12px;right:-12px;cursor:nwse-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-bottom{bottom:-12px;left:calc(50% - 12px);cursor:ns-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-bottomleft{bottom:-12px;left:-12px;cursor:nesw-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-left{top:calc(50% - 12px);left:-12px;cursor:ew-resize}:host .ngx-ic-cropper .ngx-ic-resize-bar{position:absolute;z-index:1}:host .ngx-ic-cropper .ngx-ic-resize-bar.ngx-ic-top{top:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}:host .ngx-ic-cropper .ngx-ic-resize-bar.ngx-ic-right{top:11px;right:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}:host .ngx-ic-cropper .ngx-ic-resize-bar.ngx-ic-bottom{bottom:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}:host .ngx-ic-cropper .ngx-ic-resize-bar.ngx-ic-left{top:11px;left:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}:host .ngx-ic-cropper.ngx-ic-round{outline-color:transparent}:host .ngx-ic-cropper.ngx-ic-round:after{border-radius:100%;box-shadow:0 0 0 100vw #ffffff4d;box-shadow:0 0 0 100vw var(--cropper-outline-color, rgba(255, 255, 255, .3))}@media (orientation: portrait){:host .ngx-ic-cropper.ngx-ic-round:after{box-shadow:0 0 0 100vh #ffffff4d;box-shadow:0 0 0 100vh var(--cropper-outline-color, rgba(255, 255, 255, .3))}}:host .ngx-ic-cropper.ngx-ic-round .ngx-ic-move{border-radius:100%}:host.disabled .ngx-ic-cropper .ngx-ic-resize,:host.disabled .ngx-ic-cropper .ngx-ic-resize-bar,:host.disabled .ngx-ic-cropper .ngx-ic-move{display:none}:host.ngx-ix-hidden{display:none}\n"], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1273
|
+
ImageCropperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ImageCropperComponent, selector: "image-cropper", inputs: { imageChangedEvent: "imageChangedEvent", imageURL: "imageURL", imageBase64: "imageBase64", imageFile: "imageFile", imageAltText: "imageAltText", output: "output", format: "format", transform: "transform", maintainAspectRatio: "maintainAspectRatio", aspectRatio: "aspectRatio", resetCropOnAspectRatioChange: "resetCropOnAspectRatioChange", resizeToWidth: "resizeToWidth", resizeToHeight: "resizeToHeight", cropperMinWidth: "cropperMinWidth", cropperMinHeight: "cropperMinHeight", cropperMaxHeight: "cropperMaxHeight", cropperMaxWidth: "cropperMaxWidth", cropperStaticWidth: "cropperStaticWidth", cropperStaticHeight: "cropperStaticHeight", canvasRotation: "canvasRotation", initialStepSize: "initialStepSize", roundCropper: "roundCropper", onlyScaleDown: "onlyScaleDown", imageQuality: "imageQuality", autoCrop: "autoCrop", backgroundColor: "backgroundColor", containWithinAspectRatio: "containWithinAspectRatio", hideResizeSquares: "hideResizeSquares", allowMoveImage: "allowMoveImage", cropper: "cropper", alignImage: "alignImage", disabled: "disabled", hidden: "hidden" }, outputs: { imageCropped: "imageCropped", startCropImage: "startCropImage", imageLoaded: "imageLoaded", cropperReady: "cropperReady", loadImageFailed: "loadImageFailed", transformChange: "transformChange" }, host: { listeners: { "window:resize": "onResize()", "document:mousemove": "moveImg($event)", "document:touchmove": "moveImg($event)", "document:mouseup": "moveStop()", "document:touchend": "moveStop()" }, properties: { "style.text-align": "this.alignImage", "class.disabled": "this.disabled", "class.ngx-ix-hidden": "this.hidden" } }, viewQueries: [{ propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true, static: true }, { propertyName: "sourceImage", first: true, predicate: ["sourceImage"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n [style.background]=\"imageVisible && backgroundColor\"\n #wrapper\n>\n <img\n #sourceImage\n class=\"ngx-ic-source-image\"\n *ngIf=\"safeImgDataUrl\"\n [src]=\"safeImgDataUrl\"\n [style.visibility]=\"imageVisible ? 'visible' : 'hidden'\"\n [style.transform]=\"safeTransformStyle\"\n [class.ngx-ic-draggable]=\"!disabled && allowMoveImage\"\n [attr.alt]=\"imageAltText\"\n (load)=\"imageLoadedInView()\"\n (mousedown)=\"startMove($event, moveTypes.Drag)\"\n (touchstart)=\"startMove($event, moveTypes.Drag)\"\n (error)=\"loadImageError($event)\"\n >\n <div\n class=\"ngx-ic-overlay\"\n [style.width.px]=\"maxSize.width\"\n [style.height.px]=\"maxSize.height\"\n [style.margin-left]=\"alignImage === 'center' ? marginLeft : null\"\n ></div>\n <div class=\"ngx-ic-cropper\"\n *ngIf=\"imageVisible\"\n [class.ngx-ic-round]=\"roundCropper\"\n [style.top.px]=\"cropper.y1\"\n [style.left.px]=\"cropper.x1\"\n [style.width.px]=\"cropper.x2 - cropper.x1\"\n [style.height.px]=\"cropper.y2 - cropper.y1\"\n [style.margin-left]=\"alignImage === 'center' ? marginLeft : null\"\n [style.visibility]=\"imageVisible ? 'visible' : 'hidden'\"\n (keydown)=\"keyboardAccess($event)\"\n tabindex=\"0\"\n >\n <div\n (mousedown)=\"startMove($event, moveTypes.Move)\"\n (touchstart)=\"startMove($event, moveTypes.Move)\"\n class=\"ngx-ic-move\">\n </div>\n <ng-container *ngIf=\"!hideResizeSquares\">\n <span class=\"ngx-ic-resize ngx-ic-topleft\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'topleft')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'topleft')\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-top\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-topright\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'topright')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'topright')\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-right\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-bottomright\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'bottomright')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'bottomright')\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-bottom\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-bottomleft\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'bottomleft')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'bottomleft')\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-left\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize-bar ngx-ic-top\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'top')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'top')\">\n </span>\n <span class=\"ngx-ic-resize-bar ngx-ic-right\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'right')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'right')\">\n </span>\n <span class=\"ngx-ic-resize-bar ngx-ic-bottom\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'bottom')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'bottom')\">\n </span>\n <span class=\"ngx-ic-resize-bar ngx-ic-left\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'left')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'left')\">\n </span>\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:flex;position:relative;width:100%;max-width:100%;max-height:100%;overflow:hidden;padding:5px;text-align:center}:host>div{width:100%;position:relative}:host>div img.ngx-ic-source-image{max-width:100%;max-height:100%;transform-origin:center}:host>div img.ngx-ic-source-image.ngx-ic-draggable{user-drag:none;-webkit-user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;cursor:grab}:host .ngx-ic-overlay{position:absolute;pointer-events:none;touch-action:none;outline:var(--cropper-overlay-color, white) solid 100vw;top:0;left:0}:host .ngx-ic-cropper{position:absolute;display:flex;color:#53535c;background:transparent;outline:rgba(255,255,255,.3) solid 100vw;outline:var(--cropper-outline-color, rgba(255, 255, 255, .3)) solid 100vw;touch-action:none}@media (orientation: portrait){:host .ngx-ic-cropper{outline-width:100vh}}:host .ngx-ic-cropper:after{position:absolute;content:\"\";inset:0;pointer-events:none;border:dashed 1px;opacity:.75;color:inherit;z-index:1}:host .ngx-ic-cropper .ngx-ic-move{width:100%;cursor:move;border:1px solid rgba(255,255,255,.5)}:host .ngx-ic-cropper:focus .ngx-ic-move{border-color:#1e90ff;border-width:2px}:host .ngx-ic-cropper .ngx-ic-resize{position:absolute;display:inline-block;line-height:6px;padding:8px;opacity:.85;z-index:1}:host .ngx-ic-cropper .ngx-ic-resize .ngx-ic-square{display:inline-block;background:#53535C;width:6px;height:6px;border:1px solid rgba(255,255,255,.5);box-sizing:content-box}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-topleft{top:-12px;left:-12px;cursor:nwse-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-top{top:-12px;left:calc(50% - 12px);cursor:ns-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-topright{top:-12px;right:-12px;cursor:nesw-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-right{top:calc(50% - 12px);right:-12px;cursor:ew-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-bottomright{bottom:-12px;right:-12px;cursor:nwse-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-bottom{bottom:-12px;left:calc(50% - 12px);cursor:ns-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-bottomleft{bottom:-12px;left:-12px;cursor:nesw-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-left{top:calc(50% - 12px);left:-12px;cursor:ew-resize}:host .ngx-ic-cropper .ngx-ic-resize-bar{position:absolute;z-index:1}:host .ngx-ic-cropper .ngx-ic-resize-bar.ngx-ic-top{top:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}:host .ngx-ic-cropper .ngx-ic-resize-bar.ngx-ic-right{top:11px;right:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}:host .ngx-ic-cropper .ngx-ic-resize-bar.ngx-ic-bottom{bottom:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}:host .ngx-ic-cropper .ngx-ic-resize-bar.ngx-ic-left{top:11px;left:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}:host .ngx-ic-cropper.ngx-ic-round{outline-color:transparent}:host .ngx-ic-cropper.ngx-ic-round:after{border-radius:100%;box-shadow:0 0 0 100vw #ffffff4d;box-shadow:0 0 0 100vw var(--cropper-outline-color, rgba(255, 255, 255, .3))}@media (orientation: portrait){:host .ngx-ic-cropper.ngx-ic-round:after{box-shadow:0 0 0 100vh #ffffff4d;box-shadow:0 0 0 100vh var(--cropper-outline-color, rgba(255, 255, 255, .3))}}:host .ngx-ic-cropper.ngx-ic-round .ngx-ic-move{border-radius:100%}:host.disabled .ngx-ic-cropper .ngx-ic-resize,:host.disabled .ngx-ic-cropper .ngx-ic-resize-bar,:host.disabled .ngx-ic-cropper .ngx-ic-move{display:none}:host.ngx-ix-hidden{display:none}\n"], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1245
1274
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ImageCropperComponent, decorators: [{
|
|
1246
1275
|
type: Component,
|
|
1247
1276
|
args: [{ selector: 'image-cropper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [style.background]=\"imageVisible && backgroundColor\"\n #wrapper\n>\n <img\n #sourceImage\n class=\"ngx-ic-source-image\"\n *ngIf=\"safeImgDataUrl\"\n [src]=\"safeImgDataUrl\"\n [style.visibility]=\"imageVisible ? 'visible' : 'hidden'\"\n [style.transform]=\"safeTransformStyle\"\n [class.ngx-ic-draggable]=\"!disabled && allowMoveImage\"\n [attr.alt]=\"imageAltText\"\n (load)=\"imageLoadedInView()\"\n (mousedown)=\"startMove($event, moveTypes.Drag)\"\n (touchstart)=\"startMove($event, moveTypes.Drag)\"\n (error)=\"loadImageError($event)\"\n >\n <div\n class=\"ngx-ic-overlay\"\n [style.width.px]=\"maxSize.width\"\n [style.height.px]=\"maxSize.height\"\n [style.margin-left]=\"alignImage === 'center' ? marginLeft : null\"\n ></div>\n <div class=\"ngx-ic-cropper\"\n *ngIf=\"imageVisible\"\n [class.ngx-ic-round]=\"roundCropper\"\n [style.top.px]=\"cropper.y1\"\n [style.left.px]=\"cropper.x1\"\n [style.width.px]=\"cropper.x2 - cropper.x1\"\n [style.height.px]=\"cropper.y2 - cropper.y1\"\n [style.margin-left]=\"alignImage === 'center' ? marginLeft : null\"\n [style.visibility]=\"imageVisible ? 'visible' : 'hidden'\"\n (keydown)=\"keyboardAccess($event)\"\n tabindex=\"0\"\n >\n <div\n (mousedown)=\"startMove($event, moveTypes.Move)\"\n (touchstart)=\"startMove($event, moveTypes.Move)\"\n class=\"ngx-ic-move\">\n </div>\n <ng-container *ngIf=\"!hideResizeSquares\">\n <span class=\"ngx-ic-resize ngx-ic-topleft\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'topleft')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'topleft')\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-top\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-topright\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'topright')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'topright')\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-right\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-bottomright\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'bottomright')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'bottomright')\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-bottom\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-bottomleft\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'bottomleft')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'bottomleft')\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize ngx-ic-left\">\n <span class=\"ngx-ic-square\"></span>\n </span>\n <span class=\"ngx-ic-resize-bar ngx-ic-top\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'top')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'top')\">\n </span>\n <span class=\"ngx-ic-resize-bar ngx-ic-right\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'right')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'right')\">\n </span>\n <span class=\"ngx-ic-resize-bar ngx-ic-bottom\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'bottom')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'bottom')\">\n </span>\n <span class=\"ngx-ic-resize-bar ngx-ic-left\"\n (mousedown)=\"startMove($event, moveTypes.Resize, 'left')\"\n (touchstart)=\"startMove($event, moveTypes.Resize, 'left')\">\n </span>\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:flex;position:relative;width:100%;max-width:100%;max-height:100%;overflow:hidden;padding:5px;text-align:center}:host>div{width:100%;position:relative}:host>div img.ngx-ic-source-image{max-width:100%;max-height:100%;transform-origin:center}:host>div img.ngx-ic-source-image.ngx-ic-draggable{user-drag:none;-webkit-user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;cursor:grab}:host .ngx-ic-overlay{position:absolute;pointer-events:none;touch-action:none;outline:var(--cropper-overlay-color, white) solid 100vw;top:0;left:0}:host .ngx-ic-cropper{position:absolute;display:flex;color:#53535c;background:transparent;outline:rgba(255,255,255,.3) solid 100vw;outline:var(--cropper-outline-color, rgba(255, 255, 255, .3)) solid 100vw;touch-action:none}@media (orientation: portrait){:host .ngx-ic-cropper{outline-width:100vh}}:host .ngx-ic-cropper:after{position:absolute;content:\"\";inset:0;pointer-events:none;border:dashed 1px;opacity:.75;color:inherit;z-index:1}:host .ngx-ic-cropper .ngx-ic-move{width:100%;cursor:move;border:1px solid rgba(255,255,255,.5)}:host .ngx-ic-cropper:focus .ngx-ic-move{border-color:#1e90ff;border-width:2px}:host .ngx-ic-cropper .ngx-ic-resize{position:absolute;display:inline-block;line-height:6px;padding:8px;opacity:.85;z-index:1}:host .ngx-ic-cropper .ngx-ic-resize .ngx-ic-square{display:inline-block;background:#53535C;width:6px;height:6px;border:1px solid rgba(255,255,255,.5);box-sizing:content-box}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-topleft{top:-12px;left:-12px;cursor:nwse-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-top{top:-12px;left:calc(50% - 12px);cursor:ns-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-topright{top:-12px;right:-12px;cursor:nesw-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-right{top:calc(50% - 12px);right:-12px;cursor:ew-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-bottomright{bottom:-12px;right:-12px;cursor:nwse-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-bottom{bottom:-12px;left:calc(50% - 12px);cursor:ns-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-bottomleft{bottom:-12px;left:-12px;cursor:nesw-resize}:host .ngx-ic-cropper .ngx-ic-resize.ngx-ic-left{top:calc(50% - 12px);left:-12px;cursor:ew-resize}:host .ngx-ic-cropper .ngx-ic-resize-bar{position:absolute;z-index:1}:host .ngx-ic-cropper .ngx-ic-resize-bar.ngx-ic-top{top:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}:host .ngx-ic-cropper .ngx-ic-resize-bar.ngx-ic-right{top:11px;right:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}:host .ngx-ic-cropper .ngx-ic-resize-bar.ngx-ic-bottom{bottom:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}:host .ngx-ic-cropper .ngx-ic-resize-bar.ngx-ic-left{top:11px;left:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}:host .ngx-ic-cropper.ngx-ic-round{outline-color:transparent}:host .ngx-ic-cropper.ngx-ic-round:after{border-radius:100%;box-shadow:0 0 0 100vw #ffffff4d;box-shadow:0 0 0 100vw var(--cropper-outline-color, rgba(255, 255, 255, .3))}@media (orientation: portrait){:host .ngx-ic-cropper.ngx-ic-round:after{box-shadow:0 0 0 100vh #ffffff4d;box-shadow:0 0 0 100vh var(--cropper-outline-color, rgba(255, 255, 255, .3))}}:host .ngx-ic-cropper.ngx-ic-round .ngx-ic-move{border-radius:100%}:host.disabled .ngx-ic-cropper .ngx-ic-resize,:host.disabled .ngx-ic-cropper .ngx-ic-resize-bar,:host.disabled .ngx-ic-cropper .ngx-ic-move{display:none}:host.ngx-ix-hidden{display:none}\n"] }]
|
|
@@ -1261,6 +1290,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1261
1290
|
type: Input
|
|
1262
1291
|
}], imageAltText: [{
|
|
1263
1292
|
type: Input
|
|
1293
|
+
}], output: [{
|
|
1294
|
+
type: Input
|
|
1264
1295
|
}], format: [{
|
|
1265
1296
|
type: Input
|
|
1266
1297
|
}], transform: [{
|