Class: ModraUp::ViewObserver
- Inherits:
-
Object
- Object
- ModraUp::ViewObserver
Overview
Base class for View Observers. Subclasses implement onViewChanged and onScaleFactorChange.
Registered with ModraUp::View#add_observer, onViewChanged is called on pan/rotate/scale and viewport size changes. onScaleFactorChange is called on display DPI or UI.scale_factor(view) changes.
Instance Method Summary # collapse
-
#onViewChanged(view) ⇒ nil
Called when the camera is translated, rotated, scaled, or when the viewport pixel size changes (includes dimensions since SketchUp 2019.2).
-
#onScaleFactorChange(view) ⇒ nil
Called when the DPI of the screen containing the viewport changes, synchronizing with UI.scale_factor(view).
Instance Method Details
observer.onViewChanged(view) ⇒ nil
Called when the camera is translated, rotated, scaled, or when the viewport pixel size changes (includes dimensions since SketchUp 2019.2).
observer.onScaleFactorChange(view) ⇒ nil
Called when the DPI of the screen containing the viewport changes, synchronizing with UI.scale_factor(view).