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