@nasser-sw/fabric 7.0.1-beta18 → 7.0.1-beta19

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.
@@ -412,7 +412,7 @@ class Cache {
412
412
  }
413
413
  const cache = new Cache();
414
414
 
415
- var version = "7.0.1-beta17";
415
+ var version = "7.0.1-beta19";
416
416
 
417
417
  // use this syntax so babel plugin see this import here
418
418
  const VERSION = version;
@@ -8682,6 +8682,24 @@ class Control {
8682
8682
  */
8683
8683
  render(ctx, left, top, styleOverride, fabricObject) {
8684
8684
  styleOverride = styleOverride || {};
8685
+
8686
+ // Auto-detect side controls by position and use pill renderers
8687
+ // Side controls have one axis at 0: ml/mr have y=0, mt/mb have x=0
8688
+ const isSideControl = (this.x === 0 || this.y === 0) && !(this.x === 0 && this.y === 0);
8689
+ if (isSideControl && !styleOverride.cornerStyle) {
8690
+ // Horizontal pills for left/right (y = 0)
8691
+ if (this.y === 0 && this.x !== 0) {
8692
+ renderHorizontalPillControl.call(this, ctx, left, top, styleOverride, fabricObject);
8693
+ return;
8694
+ }
8695
+ // Vertical pills for top/bottom (x = 0)
8696
+ if (this.x === 0 && this.y !== 0) {
8697
+ renderVerticalPillControl.call(this, ctx, left, top, styleOverride, fabricObject);
8698
+ return;
8699
+ }
8700
+ }
8701
+
8702
+ // Corner controls and rotation use cornerStyle
8685
8703
  switch (styleOverride.cornerStyle || fabricObject.cornerStyle) {
8686
8704
  case 'circle':
8687
8705
  renderCircleControl.call(this, ctx, left, top, styleOverride, fabricObject);