(
ctx: &mut ScriptContext<'_, API>,
visible: bool,
)
| 4904 | "canvas_v_6", "canvas_v_7", "canvas_v_8", |
| 4905 | ]; |
| 4906 | const CANVAS_H_LINES: [&str; 9] = [ |
| 4907 | "canvas_h_0", "canvas_h_1", "canvas_h_2", "canvas_h_3", "canvas_h_4", "canvas_h_5", |
| 4908 | "canvas_h_6", "canvas_h_7", "canvas_h_8", |
| 4909 | ]; |
| 4910 | |
| 4911 | /// Drops the [`apply_viewport_canvas`] memo. Call after the editor ui shell or |
| 4912 | /// the viewport panels get rebuilt: the fresh nodes carry no canvas state. |
| 4913 | pub fn invalidate_viewport_canvas<API: ScriptAPI + ?Sized>(ctx: &mut ScriptContext<'_, API>) { |
| 4914 | let _ = with_state_mut!(ctx.run, EditorState, ctx.id, |state| { |
| 4915 | state.canvas_memo_valid = false; |
| 4916 | }); |
| 4917 | } |
| 4918 | |
| 4919 | /// Forced variant for rebuild paths. |
no test coverage detected