Exemple #1
0
        /// <summary>
        /// Cancel the movement on the core handle and if present also on the slave handle
        /// </summary>
        public void CancelDrag(IInputModeContext context, PointD originalLocation)
        {
            coreHandle.CancelDrag(context, originalLocation);

            if (slaveHandle != null)
            {
                //If necessary, cancel the movement of the slave handle, using its old origin
                //We can use the original context since we have already done all decisions in InitializeDrag
                slaveHandle.CancelDrag(context, slaveOrigin);
                slaveHandle = null;
            }
        }
Exemple #2
0
        /// <summary>
        /// Cancel the movement on the core handle and if present also on the slave handles
        /// </summary>
        public void CancelDrag(IInputModeContext context, PointD originalLocation)
        {
            var childContext = Contexts.CreateInputModeContext(context.ParentInputMode, context, Lookups.Single(this));

            coreHandle.CancelDrag(context, originalLocation);
            if (firstSlaveHandle != null)
            {
                firstSlaveHandle.CancelDrag(childContext, firstOrigin);
            }
            if (lastSlaveHandle != null)
            {
                lastSlaveHandle.CancelDrag(childContext, lastOrigin);
            }
        }