notifySizeRatioChange method

void notifySizeRatioChange()

Implementation

void notifySizeRatioChange(){
  if(lastSizeRect?.size != size){
    screen.notifySizeChange(widget.sizeRect, lastSizeRect);
    grid.notifySizeChange(widget.sizeRect, lastSizeRect);
    fgLayers.notifySizeChange(widget.sizeRect, lastSizeRect);
    bgLayers.notifySizeChange(widget.sizeRect, lastSizeRect);
    double newRatio = size.aspectRatio;
    double? oldRatio = lastSizeRect?.size.aspectRatio;
    if(oldRatio != newRatio){
      screen.notifyRatioChange(size, newRatio, oldRatio);
      grid.notifyRatioChange(size, newRatio, oldRatio);
      fgLayers.notifyRatioChange(size, newRatio, oldRatio);
      bgLayers.notifyRatioChange(size, newRatio, oldRatio);
    }
  }
}