ProjectManager

Description

This module dispatches these events:

  • projectCreated: (project)
  • projectSaved: (filename, project)
  • projectLoaded: (filename, project)
  • beforeProjectClose: (filename, project);
  • projectClosed:
  • imported: (filename, element)
  • exported: (filename, element)

Functions Summary

Functions

Public API

closeProject

Close project

Public API

exportToFile

Export model fragment to a file.

elem Core.Element
Element to be exported.
fullPath string
Returns: $.Promise
JQuerty Promise Object
Public API

getFilename

Return current filename.

Returns: string
Public API

getProject

Return project

Returns: Core.Project
Public API

importFromFile

Import model fragment from a file.

parent Core.Element
Element to contain the imported element.
fullPath string
Returns: $.Promise
JQuery Promise Object.
Public API

importFromJson

Import from JSON

parent Element
Element to contain the imported element.
data Object
JSON data
Returns: Element
Imported element.
Public API

load

Load from a file

fullPath string
Returns: $.Promise
Public API

loadAsTemplate

Load from a file as template

fullPath string
Returns: $.Promise
JQuery Promise Object.
Public API

loadFromJson

Load project from JSON

data Object
JSON data.
Loaded Project
Project object.
Public API

newProject

New project

Returns: Core.Project
Public API

save

Save project to file

fullPath string
Returns: $.Promise