paper.js/src/path/SelectionState.js
Jürg Lehni fc4e88c039 Change the way segments, points and handles are selected and deselected.
There is no interdependency anymore, except for selecting a segment selects the point and both handles, and selecting a curve selects both points and handles.

Closes #355
2013-12-08 18:06:31 +01:00

21 lines
628 B
JavaScript

/*
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
* http://paperjs.org/
*
* Copyright (c) 2011 - 2013, Juerg Lehni & Jonathan Puckey
* http://lehni.org/ & http://jonathanpuckey.com/
*
* Distributed under the MIT license. See LICENSE file for details.
*
* All rights reserved.
*/
// Path#_selectedSegmentState is the addition of all segment's states, and is
// compared with SelectionState.SEGMENT, the combination of all SelectionStates
// to see if all segments are fully selected.
var SelectionState = {
HANDLE_IN: 1,
HANDLE_OUT: 2,
POINT: 4,
SEGMENT: 7 // HANDLE_IN | HANDLE_OUT | POINT
};