Urgent.News

What's breaking now, across thousands of outlets.

Tech

Declarative Dragging

Declarative dragging simplifies the process of making diagrams draggable. Instead of writing complex drag-and-drop code involving geometry, feedback, and animations, users specify which future states of the application the draggable element should lead to. The system speculatively renders these states to determine where the element can go, then combines these possibilities into a smooth, responsive drag-and-drop interaction.

The goal is to allow users to work within their familiar semantic contexts while creating rich tactile interactions within the digital realm. Dragology, a library developed for SVG interfaces on the web, implements this concept. It enables simple model-driven drag-and-drop behaviors to be composed into more complex ones and layered with features like floating, snapping, and transitions.

The concept originated from a desire to make a math game more interactive. Initially, the fundamental mechanic of selecting transformations from a menu lacked the tactile feel the creator desired. After a chance encounter with Andrew, who shared ideas about model-driven dragging, the concept took shape. A friend, Elliot, was experimenting with order-preserving maps between trees and drew a structure that inspired the creator to implement a library, Dragology, to bring declarative dragging to existing applications and restart work on a math game concept.

Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at declarative-dragging.github.io →

More in Tech

What’s next for US energy policy after the midterm elections?

I’ve been locked in to my various screens since results from midterm elections started to roll in last night. And it didn’t take long to see the beginning of the blue wave: Democrats took control of…

  • Democratic Party gains control of US House and Senate after midterm elections
  • Potential for policy debates and disagreements between Congress and White House
  • Bipartisan bill introduced to expedite energy project approvals

More from Wednesday 4 November →