Skip to content

typo: dimentions should be dimensions #7465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions web/libs/editor/src/components/VideoCanvas/VideoCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type VideoProps = {
onLoad?: (data: VideoRef) => void;
onFrameChange?: (frame: number, length: number) => void;
onEnded?: () => void;
onResize?: (dimensions: VideoDimentions) => void;
onResize?: (dimensions: VideoDimensions) => void;
onError?: (error: any) => void;
};

Expand All @@ -44,7 +44,7 @@ type PanOptions = {
y: number;
};

type VideoDimentions = {
type VideoDimensions = {
width: number;
height: number;
ratio: number;
Expand Down Expand Up @@ -110,7 +110,7 @@ export const VideoCanvas = memo(
const [zoom, setZoom] = useState(props.zoom ?? 1);
const [pan, setPan] = useState<PanOptions>(props.pan ?? { x: 0, y: 0 });

const [videoDimensions, setVideoDimensions] = useState<VideoDimentions>({ width: 0, height: 0, ratio: 1 });
const [videoDimensions, setVideoDimensions] = useState<VideoDimensions>({ width: 0, height: 0, ratio: 1 });

const [contrast, setContrast] = useState(1);
const [brightness, setBrightness] = useState(1);
Expand Down
2 changes: 1 addition & 1 deletion web/libs/editor/src/mixins/DrawingTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const DrawingTool = types
return !self.isDrawing && !self.annotation.isReadOnly();
},
get defaultDimensions() {
console.warn("Drawing tool model needs to implement defaultDimentions getter in views");
console.warn("Drawing tool model needs to implement defaultDimensions getter in views");
return {};
},
get MIN_SIZE() {
Expand Down
4 changes: 2 additions & 2 deletions web/libs/editor/src/tags/object/Video/HtxVideo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ import { VideoRegions } from "./VideoRegions";

const isFFDev2715 = isFF(FF_DEV_2715);

function useZoom(videoDimensions, canvasDimentions, shouldClampPan) {
function useZoom(videoDimensions, canvasDimensions, shouldClampPan) {
const [zoomState, setZoomState] = useState({ zoom: 1, pan: { x: 0, y: 0 } });
const data = useRef({});

data.current.video = videoDimensions;
data.current.canvas = canvasDimentions;
data.current.canvas = canvasDimensions;
data.current.shouldClampPan = shouldClampPan;

const clampPan = useCallback((pan, zoom) => {
Expand Down
4 changes: 2 additions & 2 deletions web/libs/editor/src/tags/object/Video/Rectangle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { observer } from "mobx-react";
import { type FC, useMemo } from "react";
import { Group, Rect } from "react-konva";
import { useRegionStyles } from "../../../hooks/useRegionColor";
import { getNodeAbsoluteDimensions, normalizeNodeDimentions } from "./tools";
import { getNodeAbsoluteDimensions, normalizeNodeDimensions } from "./tools";
import type { WorkingArea } from "./types";
import { LabelOnVideoBbox } from "../../../components/ImageView/LabelOnRegion";

Expand Down Expand Up @@ -55,7 +55,7 @@ const RectanglePure: FC<RectProps> = ({
};

const onTransform = (e: KonvaEventObject<Event>) => {
normalizeNodeDimentions(e.target, "rect");
normalizeNodeDimensions(e.target, "rect");
};

return (
Expand Down
2 changes: 1 addition & 1 deletion web/libs/editor/src/tags/object/Video/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const getNodeAbsoluteDimensions = (node: KonvaNode, workingArea: WorkingA
return result;
};

export const normalizeNodeDimentions = <T extends KonvaNode>(node: T, shapeType: "rect") => {
export const normalizeNodeDimensions = <T extends KonvaNode>(node: T, shapeType: "rect") => {
const scaleX = node.scaleX();
const scaleY = node.scaleY();

Expand Down
Loading