Skip to content
Merged
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
8 changes: 4 additions & 4 deletions src/visual-image-tool.js
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ class VisualImageTool {

const isActive = active === undefined ? !this.state.focusActive : active;

if (active && !this.state.focusActive) {
if (isActive && !this.state.focusActive) {
// Activer le point focal
if (!this.state.focusMarker) {
this._createFocusMarker();
Expand All @@ -725,7 +725,7 @@ class VisualImageTool {
this._updateFocusMarkerPosition();
this.state.focusMarker.style.display = "block";
this.state.focusActive = true;
} else if (!active && this.state.focusActive) {
} else if (!isActive && this.state.focusActive) {
// Désactiver le point focal
if (this.state.focusMarker) {
this.state.focusMarker.style.display = "none";
Expand All @@ -750,7 +750,7 @@ class VisualImageTool {

const isActive = active === undefined ? !this.state.cropActive : active;

if (active && !this.state.cropActive) {
if (isActive && !this.state.cropActive) {
// Activer la zone de recadrage
if (!this.state.cropOverlay) {
this._createCropOverlay();
Expand All @@ -774,7 +774,7 @@ class VisualImageTool {
this._updateCropOverlayPosition();
this.state.cropOverlay.style.display = "block";
this.state.cropActive = true;
} else if (!active && this.state.cropActive) {
} else if (!isActive && this.state.cropActive) {
// Désactiver la zone de recadrage
if (this.state.cropOverlay) {
this.state.cropOverlay.style.display = "none";
Expand Down