Custom Images
naquiroz opened this issue · 2 comments
naquiroz commented
Any plans for adding custom images?
markmanx commented
You should already be able to load your own custom images in the following way:
import { InitialData, INITIAL_DATA } from 'isoflow';
const icons: InitialData['icons'] = [
{
id: 'custom-icon',
name: 'Custom Icon',
url: 'https://example.com/path-to-image', // can also be a base64 url
collection: 'Collection name', // optional,
isIsometric: false // optional, use this if you don't want Isoflow to apply isometric perspective to the icon
}
];
<Isoflow initialData={{ ...INITIAL_DATA, icons }} />
viperdream26 commented
You should already be able to load your own custom images in the following way:
import { InitialData, INITIAL_DATA } from 'isoflow'; const icons: InitialData['icons'] = [ { id: 'custom-icon', name: 'Custom Icon', url: 'https://example.com/path-to-image', // can also be a base64 url collection: 'Collection name', // optional, isIsometric: false // optional, use this if you don't want Isoflow to apply isometric perspective to the icon } ]; <Isoflow initialData={{ ...INITIAL_DATA, icons }} />
Excuse my ignorance, but I cloned the git and am successfully running locally. Any specific instructions on how I could accomplish this please? Thx and great work on this useful tool. I normally use draw.io but this provides a really neat perspective and is easy to use.