parallax / ddt

DDT (Drag and Drop Tables) is a library that adds drag and drop reordering support to HTML tables.
MIT License
5 stars 0 forks source link

DDTPoint minus and add affect both axis #41

Closed nathggns closed 10 years ago

nathggns commented 10 years ago

DDTPoint has this really weird thing that by default arithmetic affects both axis - this is almost never what you want.

We should add a syntax that looks more like this

var point = new DDTPoint(5, 10);
var newPoint = point.add(DDTPoint.X, 5);

newPoint.x
// 10

newPoint.y
// 10
nathggns commented 10 years ago

DDTPoint.X and DDTPoint.Y will simply be constants that point to the DDTAxis enum so we can identify which axis to modify.

If we implement this, we can remove the addToAxis method.