Browse Source

fix build

pull/6691/head
IhorKaleniuk666 3 weeks ago
parent
commit
df6b014803
  1. 2
      docs/api/assets.md
  2. 21
      docs/api/datasources.md
  3. 2
      docs/api/device.md
  4. 18
      docs/api/editor.md
  5. 2
      docs/api/selector.md
  6. 4
      packages/core/src/asset_manager/model/Assets.ts

2
docs/api/assets.md

@ -85,6 +85,8 @@ editor.on('asset:custom', ({ container, assets, ... }) => { ... });
editor.on('asset', ({ event, model, ... }) => { ... }); editor.on('asset', ({ event, model, ... }) => { ... });
``` ```
* AssetsEventCallback
## Methods ## Methods
* [open][2] * [open][2]

21
docs/api/datasources.md

@ -113,6 +113,18 @@ const ds = dsm.get('my_data_source_id');
Returns **[DataSource]** Data source. Returns **[DataSource]** Data source.
## getAll
Return all data sources.
### Examples
```javascript
const ds = dsm.getAll();
```
Returns **[Array][8]<[DataSource]>**&#x20;
## getValue ## getValue
Get value from data sources by path. Get value from data sources by path.
@ -121,6 +133,7 @@ Get value from data sources by path.
* `path` **[String][7]** Path to value. * `path` **[String][7]** Path to value.
* `defValue` **any** Default value if the path is not found. * `defValue` **any** Default value if the path is not found.
* `opts` **{context: Record<[string][7], any>?}?**&#x20;
Returns **any** const value = dsm.getValue('ds\_id.record\_id.propName', 'defaultValue'); Returns **any** const value = dsm.getValue('ds\_id.record\_id.propName', 'defaultValue');
@ -139,7 +152,7 @@ Set value in data sources by path.
dsm.setValue('ds_id.record_id.propName', 'new value'); dsm.setValue('ds_id.record_id.propName', 'new value');
``` ```
Returns **[Boolean][8]** Returns true if the value was set successfully Returns **[Boolean][9]** Returns true if the value was set successfully
## remove ## remove
@ -183,7 +196,7 @@ data record, and optional property path.
Store data sources to a JSON object. Store data sources to a JSON object.
Returns **[Array][9]** Stored data sources. Returns **[Array][8]** Stored data sources.
## load ## load
@ -209,6 +222,6 @@ Returns **[Object][6]** Loaded data sources.
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String [7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean [8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array [9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

2
docs/api/device.md

@ -2,7 +2,7 @@
## Device ## Device
**Extends ModelWithPatches**
### Properties ### Properties

18
docs/api/editor.md

@ -30,6 +30,24 @@ editor.on('undo', () => { ... });
editor.on('redo', () => { ... }); editor.on('redo', () => { ... });
``` ```
* `patch:update` Patch finalized.
```javascript
editor.on('patch:update', (patch) => { ... });
```
* `patch:undo` Patch undo executed.
```javascript
editor.on('patch:undo', (patch) => { ... });
```
* `patch:redo` Patch redo executed.
```javascript
editor.on('patch:redo', (patch) => { ... });
```
* `load` Editor is loaded. At this stage, the project is loaded in the editor and elements in the canvas are rendered. * `load` Editor is loaded. At this stage, the project is loaded in the editor and elements in the canvas are rendered.
```javascript ```javascript

2
docs/api/selector.md

@ -2,7 +2,7 @@
## Selector ## Selector
**Extends ModelWithPatches**
### Properties ### Properties

4
packages/core/src/asset_manager/model/Assets.ts

@ -4,7 +4,7 @@ import AssetImage from './AssetImage';
import AssetImageView from '../view/AssetImageView'; import AssetImageView from '../view/AssetImageView';
import TypeableCollection from '../../domain_abstract/model/TypeableCollection'; import TypeableCollection from '../../domain_abstract/model/TypeableCollection';
export default class Assets extends CollectionWithPatches<Asset> { export class Assets extends CollectionWithPatches<Asset> {
constructor(models?: any, options?: any) { constructor(models?: any, options?: any) {
super(models, options); super(models, options);
} }
@ -39,3 +39,5 @@ Assets.prototype.types = [
}, },
}, },
]; ];
export default Assets;

Loading…
Cancel
Save