mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-14 20:33:30 +01:00
create primitive objects in origin if datum is not specified
This commit is contained in:
parent
8002f53615
commit
ef2daf3188
6 changed files with 8 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
export default {
|
||||
datum: {
|
||||
type: 'datum',
|
||||
optional: true,
|
||||
defaultValue: {type: 'selection'}
|
||||
},
|
||||
width: {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
export default {
|
||||
datum: {
|
||||
type: 'datum',
|
||||
optional: true,
|
||||
defaultValue: {type: 'selection'}
|
||||
},
|
||||
radius: {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
export default {
|
||||
datum: {
|
||||
type: 'datum',
|
||||
optional: true,
|
||||
defaultValue: {type: 'selection'}
|
||||
},
|
||||
radius: {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import CSys from '../../../math/csys';
|
||||
|
||||
export default function datumConsumingOperation(params, services, run) {
|
||||
let mDatum = params.datum && services.cadRegistry.findDatum(params.datum);
|
||||
let res = run(mDatum.csys);
|
||||
let res = run(mDatum ? mDatum.csys : CSys.ORIGIN);
|
||||
if (mDatum) {
|
||||
res.consumed.push(mDatum);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
export default {
|
||||
datum: {
|
||||
type: 'datum',
|
||||
optional: true,
|
||||
defaultValue: {type: 'selection'}
|
||||
},
|
||||
radius: {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
export default {
|
||||
datum: {
|
||||
type: 'datum',
|
||||
optional: true,
|
||||
defaultValue: {type: 'selection'}
|
||||
},
|
||||
radius: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue