microsoft / microsoft/maker.js
How can I get the angle of the text created by model.Text()?
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 302
- Avg merge
- 21h 28m
- Merged PRs (30d)
- 5
Description
export function getTextModel(font, caption, font_size) {
const model = new makerjs.models.Text(font, caption, font_size);
model.layer = DrawLayerNames.Caption;
const model_extents = makerjs.measure.modelExtents(model);
return [model, model_extents];
}
const [caption, caption_extents] = getTextModel(font, `H: ${H}`, render_options.font_size);
caption.origin = [
// some origin
];
makerjs.model.rotate(caption, /* some angle*/, caption.origin);
How can I find out how rotated the text is in another part of the program?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report uses makerjs.models.Text, makerjs.measure.modelExtents, and makerjs.model.rotate; start by tracing those API entry points in the repository. Confirm whether the model exposes its rotation state and document the supported way to retrieve it, with an example matching the issue’s JavaScript usage. Done means the angle can be obtained reliably from another part of the program.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100