FZPView
FZPView class is used by the fzp breadboard, pcb and schematics view.
Example:
const {FZPView} = require('fzp-js')
let view = new FZPView()
Constructor Summary
| Public Constructor | ||
| public |
FZPView constructor |
|
Member Summary
| Public Members | ||
| public |
FZPView flip horizontal |
|
| public |
FZPView flip vertical |
|
| public |
The FZPView image |
|
| public |
The FZPView layer id's |
|
| public |
The FZPView svg data |
|
Method Summary
| Public Methods | ||
| public |
existLayerId(id: String): Boolean Check if a layer id exist at the FZPView layerIds array |
|
| public |
load the svg of the image path from the fritzing-parts api |
|
| public |
Set the FZPView image source |
|
| public |
setLayerId(name: String): FZPView Add a layer id to the FZPView |
|
| public |
Set the svg data |
|
| public |
Get the total number of FZPView layer id's |
|
Public Constructors
Public Members
Public Methods
public existLayerId(id: String): Boolean source
Check if a layer id exist at the FZPView layerIds array
Params:
| Name | Type | Attribute | Description |
| id | String |
public loadSVG(baseurl: String): Promise source
load the svg of the image path from the fritzing-parts api
Params:
| Name | Type | Attribute | Description |
| baseurl | String | the url to the fritzing-parts/core directory |
public setImage(src: String): FZPView source
Set the FZPView image source
Params:
| Name | Type | Attribute | Description |
| src | String | The image source |
public setLayerId(name: String): FZPView source
Add a layer id to the FZPView
Params:
| Name | Type | Attribute | Description |
| name | String | The layer name |
