func (v *BoolEditorView) Receive(notif flux.NotifPayload) { defer close(notif.Done) vecty.Rerender(v) if notif.Type == stores.NodeFocus { v.Focus() } }
func (v *BranchControlView) Receive(notif flux.NotifPayload) { defer close(notif.Done) vecty.Rerender(v) if v.model != nil && v.App.Branches.Selected() == v.model { v.focus() } }
func (v *EditorView) Receive(notif flux.NotifPayload) { defer close(notif.Done) vecty.Rerender(v) if v.focus != nil && notif.Type == stores.NodeFocus { v.focus.Call("focus") } }
func (v *IconEditorView) Receive(notif flux.NotifPayload) { defer close(notif.Done) v.icon = v.model.Node.Value.(*Icon) vecty.Rerender(v) if notif.Type == stores.NodeFocus { v.Focus() } }
func (v *PanelView) Receive(notif flux.NotifPayload) { defer close(notif.Done) v.branch = v.App.Branches.Selected() v.node = v.App.Nodes.Selected() vecty.Rerender(v) if notif.Type == stores.BranchSelected { v.panel.Node.Get("parentNode").Set("scrollTop", "0") } }
func (v *EditorListView) Receive(notif flux.NotifPayload) { defer close(notif.Done) if v.sort && notif.Type == stores.NodeArrayReorder { js.Global.Call("$", v.container.Node).Call("sortable", "cancel") } vecty.Rerender(v) if v.sort { v.sortable() } }
func (v *AddPopupView) Receive(notif flux.NotifPayload) { defer close(notif.Done) v.model = v.App.Misc.AddPopup() vecty.Rerender(v) if v.model.Visible { js.Global.Call("$", "#add-modal").Call("modal", "show") if v.model.HasName() { js.Global.Call("$", "#add-modal-name").Call("focus") } else { js.Global.Call("$", "#add-modal-type").Call("focus") } } else { js.Global.Call("$", "#add-modal").Call("modal", "hide") } }
func (v *TreeView) Receive(notif flux.NotifPayload) { defer close(notif.Done) v.Root = v.App.Branches.Root() vecty.Rerender(v) }
func (v *View) Receive(notif NotifPayload) { // ke: {"block": {"notest": true}} // Default receive function for when view doesn't override it defer close(notif.Done) vecty.Rerender(v.Self) }