Exemplo n.º 1
0
        internal static bool AddToDocument(SceneView view, IProjectItem projectItem, Point dropPoint, ISceneInsertionPoint insertionPoint)
        {
            AssetDocumentType assetDocumentType = projectItem.DocumentType as AssetDocumentType;

            if (assetDocumentType != null)
            {
                return(assetDocumentType.AddToDocument(projectItem, (IView)view, insertionPoint, new Rect(dropPoint, new Vector(double.PositiveInfinity, double.PositiveInfinity))));
            }
            return(projectItem.DocumentType.AddToDocument(projectItem, (IView)view));
        }
Exemplo n.º 2
0
        protected override SceneNode InternalCreateInstance(ISceneInsertionPoint insertionPoint, Rect rect, OnCreateInstanceAction action)
        {
            AssetDocumentType assetDocumentType = this.projectItem.DocumentType as AssetDocumentType;

            if (assetDocumentType != null)
            {
                assetDocumentType.AddToDocument(this.projectItem, (IView)insertionPoint.SceneNode.ViewModel.DefaultView, insertionPoint, rect);
            }
            else
            {
                this.projectItem.DocumentType.AddToDocument(this.projectItem, (IView)insertionPoint.SceneNode.ViewModel.DefaultView);
            }
            return((SceneNode)null);
        }