Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/core/src/view/geometry/Shape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ import { StyleDefaultsConfig } from '../../util/config';
* ```
*/
class Shape {
// Assigned in mxCellRenderer
/**
* Switch to preserve image aspect.
* @default false
*/
preserveImageAspect = false;
overlay: CellOverlay | null = null;
indicator: Shape | null = null;
Expand Down
14 changes: 1 addition & 13 deletions packages/core/src/view/geometry/node/ImageShape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import RectangleShape from './RectangleShape';
import type Rectangle from '../Rectangle';
import CellState from '../../cell/CellState';
import type AbstractCanvas2D from '../../canvas/AbstractCanvas2D';
import CellOverlay from '../../cell/CellOverlay';
import { NONE } from '../../../util/Constants';
import { ColorValue } from '../../../types';

Expand All @@ -42,23 +41,12 @@ class ImageShape extends RectangleShape {

this.imageSrc = imageSrc;
this.shadow = false;
this.preserveImageAspect = true;
}

// TODO: Document me!!
shadow: boolean;

imageSrc: string;

// Used in mxCellRenderer
overlay: CellOverlay | null = null;

/**
* Switch to preserve image aspect. Default is true.
* @default true
*/
// preserveImageAspect: boolean;
preserveImageAspect = true;

/**
* Disables offset in IE9 for crisper image output.
*/
Expand Down