casesandberg/react-color

EditableInput: Increment on Drag

Open

#8 geöffnet am 17. Aug. 2015

Auf GitHub ansehen
 (4 Kommentare) (1 Reaktion) (0 zugewiesene Personen)JavaScript (946 Forks)batch import
help wanted

Repository-Metriken

Stars
 (11.679 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

The text input fields could be draggable, as with applications like After Effects.

  • On :hover, a east-west cursor is shown (north-south if more appropriate for the given layout).
  • On drag originating from the field, the value is modified by +/-1 at an interval that scales with the vector's magnitude. On account of typical input precision, the rate should be slow (1 per 500ms?) for a generous margin near the field (estimated: first 8-10px).
  • On mouseup, the timeout is cancelled so as to not increment after gesture ends.
  • It may be necessary to lock out text-selection until mouseup (or focus) inside the field. Many apps that support this have an edit state to resolve these conflicting interactions.

Contributor Guide