Interface InteractionUpdateBinderBuilder<I, A, D>

The binding builder API that already knows the type of user interaction the bindings will use (for user interactions that can be updated).

interface InteractionUpdateBinderBuilder {
    cancel(fn): InteractionUpdateBinderBuilder<I, A, D>;
    catch(fn): InteractionUpdateBinderBuilder<I, A, D>;
    configureRules(ruleName, severity): InteractionUpdateBinderBuilder<I, A, D>;
    continuousExecution(): InteractionUpdateBinderBuilder<I, A, D>;
    end(fn): InteractionUpdateBinderBuilder<I, A, D>;
    endOrCancel(fn): InteractionUpdateBinderBuilder<I, A, D>;
    log(...level): InteractionUpdateBinderBuilder<I, A, D>;
    name(name): InteractionUpdateBinderBuilder<I, A, D>;
    on<W>(widget, ...widgets): InteractionUpdateBinderBuilder<I, A, D>;
    onDynamic(node): InteractionUpdateBinderBuilder<I, A, D>;
    preventDefault(): InteractionUpdateBinderBuilder<I, A, D>;
    stopImmediatePropagation(): InteractionUpdateBinderBuilder<I, A, D>;
    throttle(timeout): InteractionUpdateBinderBuilder<I, A, D>;
    when(fn, mode?): InteractionUpdateBinderBuilder<I, A, D>;
}

Type Parameters

Hierarchy

Methods

  • Defines what to do when a command is cancelled (because the interaction is cancelled). The undoable command is automatically cancelled so that nothing must be done on the command. A binder can have several cummulative 'cancel' routines.

    Parameters

    • fn: ((i, acc) => void)
        • (i, acc): void
        • Parameters

          • i: D
          • acc: A

          Returns void

    Returns InteractionUpdateBinderBuilder<I, A, D>

    A clone of the current binder to chain the building configuration.

  • Allows the processing of errors during the execution of the binding. Errors reported here are errors thrown in arrow functions provided to the the different routines of the binder and errors triggered by the command. A binder can have several cummulative 'catch' routines.

    Parameters

    • fn: ((ex) => void)

      The function to process the error caught by the binding during its execution

        • (ex): void
        • Parameters

          • ex: unknown

          Returns void

    Returns InteractionUpdateBinderBuilder<I, A, D>

    A clone of the current binder to chain the building configuration.

  • Defines what to do when a command is cancelled (because the interaction is cancelled). The undoable command is automatically cancelled so that nothing must be done on the command. A binder can have several cummulative 'endOrCancel' routines.

    Parameters

    • fn: ((i, acc) => void)
        • (i, acc): void
        • Parameters

          • i: D
          • acc: A

          Returns void

    Returns InteractionUpdateBinderBuilder<I, A, D>

    A clone of the current binder to chain the building configuration.

  • Backpressure operation. Instead of emitting all the events, successive events of the same type are factorized modulo a timeout. The timeout is used to send at max one event of the same type in a given duration (the timeout). For example with three mouse moves and a time out of 10ms. The first move is received and processed. The timer starts. A second mouse moves is received at T+5ms. It is for the moment not processed. A third mouse move is received at T+8ms. The second move is finally ignored and this third one not processed yet. At T+10s the third event is finally processed. Based on our own experiments, the given timeout value should be greater than 10ms to throttle some UI events.

    Parameters

    • timeout: number

      The timeout used by the throttle operation. In ms.

    Returns InteractionUpdateBinderBuilder<I, A, D>

    A clone of the current binder to chain the building configuration.

  • Specifies the conditions to fulfill to initialise, update, or execute the command while the interaction is running. A binder can have several cummulative 'when' routines.

    Parameters

    • fn: ((i, acc) => boolean)

      The predicate that checks whether the command can be initialised, updated, or executed. This predicate takes as arguments the data of the ongoing user interaction involved in the binding.

        • (i, acc): boolean
        • Parameters

          • i: D
          • acc: Readonly<A>

          Returns boolean

    • Optional mode: WhenType

    Returns InteractionUpdateBinderBuilder<I, A, D>

    A clone of the current binder to chain the building configuration.

Generated using TypeDoc