コード例 #1
0
        /// <inheritdoc/>
        public override void UpdateViews(BaseModel model)
        {
            base.UpdateViews(model);

            var modelAsExpandable = model as ExpandableModel;

            remoteImageBehaviour.Load(modelAsExpandable.imageURL);

            // Modify the recycled expand behavior script so it's up-to-date with the model.
            if (expandCollapseOnClickBehaviour)
            {
                expandCollapseOnClickBehaviour.expanded        = modelAsExpandable.expanded;
                expandCollapseOnClickBehaviour.nonExpandedSize = modelAsExpandable.nonExpandedSize;
            }
        }
コード例 #2
0
        internal override void UpdateViews(BaseModel model)
        {
            base.UpdateViews(model);

            var modelAsExpandable = model as ExpandableModel;

            remoteImageBehaviour.Load(modelAsExpandable.imageURL);

            // Modify the recycled expand behavior script so it's up-to-date with the model.
            if (expandCollapseOnClickBehaviour)
            {
                expandCollapseOnClickBehaviour.expanded = modelAsExpandable.expanded;

                // If the model 'knows' that it's not expanded, then its visualSize field represents the non-expanded size, so let the expand behavior also be aware of this
                if (!modelAsExpandable.expanded)
                {
                    expandCollapseOnClickBehaviour.nonExpandedSize = model.visualSize;
                }
            }
        }