Trying to get NSPanel to expand downward.
✓ Published0🌍 Public
KKevinGutowski
Last edited Jun 12, 2019
Created on Jun 12, 2019
A JavaScript sketch demonstrates an attempt to animate an NSPanel downward using the Sketch plugin API. The code creates a floating panel with a title bar and close button, initially sized at 312 by 210 pixels. After displaying the panel, it calls `setFrame_display_animate` to enlarge its height by 50 pixels. However, because the panel's origin remains unchanged, the animation expands the panel upward instead of downward. The commented-out alternative adjusts the y-origin by negative 50 pixels, which would shift the panel up to achieve the desired downward expansion. The sketch relies on `NSThread.mainThread().threadDictionary` for panel management and `NSMakeRect` for frame geometry.
AI-generated description