Пример #1
0
        public void BindStyleField(BuilderStyleRow styleRow, TransitionsListView transitionsListView)
        {
            var transitionList = GetOrCreateFieldListForStyleName(TransitionConstants.Transition);

            transitionList.Add(transitionsListView);

            transitionsListView.RegisterCallback <TransitionAddedEvent, TransitionsListView>(OnTransitionAdded, transitionsListView);
            transitionsListView.RegisterCallback <TransitionChangedEvent, TransitionsListView>(OnTransitionChanged, transitionsListView);
            transitionsListView.RegisterCallback <TransitionRemovedEvent, TransitionsListView>(OnTransitionRemoved, transitionsListView);
        }
Пример #2
0
        public void RefreshStyleField(TransitionsListView transitionsListView)
        {
            var computedData = currentVisualElement.computedStyle.transitionData.Read();

            using var setData = GetBuilderTransitionData();

            var max = Mathf.Max(computedData.MaxCount(), setData.MaxCount());
            var builderTransitions = ListPool <BuilderTransition> .Get();

            try
            {
                for (var i = 0; i < max; i++)
                {
                    builderTransitions.Add(default);