Hello,
i have question, is it possible create text in json array (in php) and add text to canvas by 'toSVGPathData' ? i try similar to the points but it doesn't work :-(
Points:
$pathArray['models']['points']['paths']['point_'.$i]['type'] = 'circle';
$pathArray['models']['points']['paths']['point_'.$i]['origin'][0] = $getPointsByID[$i]['x'];
$pathArray['models']['points']['paths']['point_'.$i]['origin'][1] = $getPointsByID[$i]['y'];
$pathArray['models']['points']['paths']['point_'.$i]['radius'] = 0.1;
Text:
$pathArray['models']['texts']['paths']['text_'.$i]['type'] = 'text';
$pathArray['models']['texts']['paths']['text_'.$i]['value'] = 'Hello';
$pathArray['models']['texts']['paths']['text_'.$i]['fontSize'] = 500;
After get model paths with ajax i append path to the div element:
var height = $('.page-footer').offset().top - $('.frame-wrap').offset().top - $('.frame-wrap').outerHeight();
const sbp = require("svg-blueprint");
sbp.settings.axisColor = "red";
const makerjs = require('makerjs');
const blueprint = new sbp.Blueprint({
parentSelector: "#canvas-makerjs",
width: '100%',
height: height+'px'
});
const path = makerjs.exporter.toSVGPathData(data.routePath, { origin: [0, 0] });
blueprint.append('path', { d: path });
blueprint.fit();
Please HELP ME!
Hello,
i have question, is it possible create text in json array (in php) and add text to canvas by 'toSVGPathData' ? i try similar to the points but it doesn't work :-(
Points:
Text:
After get model paths with ajax i append path to the div element:
Please HELP ME!