svalavuo 5 өдөр өмнө
parent
commit
83d25c1b17
1 өөрчлөгдсөн 6 нэмэгдсэн , 1 устгасан
  1. 6 1
      js/wysiwyg.js

+ 6 - 1
js/wysiwyg.js

@@ -14,7 +14,7 @@ class WYSIWYGEditor {
         this.selectedImages = [];
         this.resizingImage = null;
         this.resizeData = null;
-        this.aspectRatioLocked = false;
+        this.aspectRatioLocked = true;
         
         this.createEditor();
         this.bindEvents();
@@ -459,6 +459,11 @@ class WYSIWYGEditor {
         toggle.textContent = this.aspectRatioLocked ? 'Locked' : 'Free';
         toggle.title = 'Toggle aspect ratio lock';
         
+        // Set initial locked state
+        if (this.aspectRatioLocked) {
+            toggle.classList.add('locked');
+        }
+        
         toggle.addEventListener('click', (e) => {
             e.stopPropagation();
             this.aspectRatioLocked = !this.aspectRatioLocked;