Ejemplo n.º 1
0
        protected override void UnregisterCallbacksFromTarget()
        {
            target.UnregisterCallback <MouseOverEvent>(OnMouseOver);
            target.UnregisterCallback <MouseOutEvent>(OnMouseOut);

            ResetInsertLocation();
            m_InsertLocation = null;
        }
Ejemplo n.º 2
0
        protected override void RegisterCallbacksOnTarget()
        {
            if (!(target is VisualElement && target is IInsertLocation))
            {
                throw new InvalidOperationException("Manipulator can only be added to an IInsertLocation VisualElement");
            }

            m_InsertLocation = target as IInsertLocation;

            target.RegisterCallback <MouseOverEvent>(OnMouseOver);
            target.RegisterCallback <MouseOutEvent>(OnMouseOut);
        }