Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Fix issue on svg text generate gcode #475

Merged
merged 1 commit into from Oct 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/flux/models/SvgModelGroup.js
Expand Up @@ -517,7 +517,7 @@ class SvgModelGroup {
.then((res) => {
const { originalName, uploadName } = res.body;
const sourceType = model.type === 'text' ? 'raster' : 'svg';
const mode = 'vector';
const mode = headType === 'cnc' ? 'greyscale' : 'bw';

let { config, gcodeConfig } = generateModelDefaultConfigs(headType, sourceType, mode);

Expand Down
2 changes: 1 addition & 1 deletion src/app/widgets/CNCPath/CNCPath.jsx
Expand Up @@ -196,7 +196,7 @@ class CNCPath extends PureComponent {

const isRasterGreyscale = (sourceType === 'raster' && mode === 'greyscale');
const isSvgVector = ((sourceType === 'svg' || sourceType === 'dxf') && mode === 'vector');
const isTextVector = (sourceType === 'raster' && mode === 'vector' && config.svgNodeName === 'text');
const isTextVector = (config.svgNodeName === 'text');
const isEditor = page === PAGE_EDITOR;
const isProcess = page === PAGE_PROCESS;
const isProcessMode = isEditor && sourceType === 'raster' && config.svgNodeName !== 'text';
Expand Down
2 changes: 1 addition & 1 deletion src/app/widgets/LaserParams/LaserParameters.jsx
Expand Up @@ -199,7 +199,7 @@ class LaserParameters extends PureComponent {
const isGreyscale = (sourceType === 'raster' && mode === 'greyscale');
const isRasterVector = (sourceType === 'raster' && mode === 'vector');
const isSvgVector = ((sourceType === 'svg' || sourceType === 'dxf') && mode === 'vector');
const isTextVector = (sourceType === 'raster' && mode === 'vector' && config.svgNodeName === 'text');
const isTextVector = (config.svgNodeName === 'text');
const isProcessMode = isEditor && sourceType === 'raster' && config.svgNodeName !== 'text';

return (
Expand Down