novdom/parameter/motion

Warning: This is still in development and should not be used yet.

Types

pub type DragEvent(a) {
  DragEvent(
    value: a,
    component: Component,
    drop: fn(DragEvent(a)) -> Nil,
    cancel: fn(DragEvent(a), fn() -> Nil) -> Nil,
    droppable: Bool,
  )
}

Constructors

  • DragEvent(
      value: a,
      component: Component,
      drop: fn(DragEvent(a)) -> Nil,
      cancel: fn(DragEvent(a), fn() -> Nil) -> Nil,
      droppable: Bool,
    )
pub type DragOption {
  New(Component)
  Self(reinsert: Bool)
  Copy(hide_self: Bool)
}

Constructors

  • New(Component)
  • Self(reinsert: Bool)
  • Copy(hide_self: Bool)

Functions

pub fn add_reinsert_info(component: Component) -> Nil
pub fn apply_drag_listener(
  e: Event,
  component: Component,
  onmouseup: fn(Event) -> Nil,
) -> Nil
pub fn clean_js() -> Nil
pub fn get_reinsert_fn(component: Component) -> fn() -> Nil
pub fn init() -> Nil
pub fn ondrag(
  option: DragOption,
  value value: a,
  ondrag ondrag: fn(DragEvent(a)) -> Nil,
  oncancel oncancel: fn(DragEvent(a), fn() -> Nil) -> Nil,
  ondrop ondrop: fn(DragEvent(a)) -> Nil,
) -> Parameter
pub fn ondrop(
  ondrag ondrag: fn(DragEvent(a)) -> Nil,
  onhover onhover: fn(DragEvent(a)) -> Bool,
  onunhover onunhover: fn(DragEvent(a)) -> Nil,
  ondrop ondrop: fn(DragEvent(a), fn() -> Nil) -> Nil,
) -> Parameter
pub fn store_mouse_position(event: Event) -> Nil
Search Document