You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.
Trying to integrate literallycanvas in to my react application.
I have created the following component based on the documentation.
import React, { Component } from 'react';
import LC from "literallycanvas";
import LiterallyCanvas from "literallycanvas/lib/js/core/LiterallyCanvas";
import defaultOptions from "literallycanvas/lib/js/core/defaultOptions";
export class DrawCanvas extends Component {
constructor(props) {
super(props);
....
defaultOptions.tools = [LC.tools.Pencil, LC.tools.Eraser]
defaultOptions.imageURLPrefix = "/lib/img";
this.lc = new LiterallyCanvas(defaultOptions);
}
save() {
localStorage.setItem('drawing', JSON.stringify(this.lc.getSnapshot()));
this.setState({svgText: this.lc.getSVGString()});
}
render() {
return (
<LC.LiterallyCanvasReactComponent lc={this.lc}/>
)
}
export default DrawCanvas;
When the component loads the toolbar is shown but the icons of the available tools are not.
I'm assuming an import is missing but I can't seem to figure out which it is.
I have the same behavior when not defining the array of tools but keeping the standard.
Attached is a png wich shows the results of the code above.
Question: What have I forgotten to import so that the icons are correctly displayed?
Edit: The buttons and it's functionality all work, its simply the icons that are not displayed correctly.
The text was updated successfully, but these errors were encountered:
Hello,
Trying to integrate literallycanvas in to my react application.
I have created the following component based on the documentation.
When the component loads the toolbar is shown but the icons of the available tools are not.
I'm assuming an import is missing but I can't seem to figure out which it is.
I have the same behavior when not defining the array of tools but keeping the standard.
Attached is a png wich shows the results of the code above.
Question: What have I forgotten to import so that the icons are correctly displayed?
Edit: The buttons and it's functionality all work, its simply the icons that are not displayed correctly.
The text was updated successfully, but these errors were encountered: