reverse belt X axis label order fixes #149
This commit is contained in:
parent
702f9c3a2b
commit
03d5c87057
2 changed files with 14 additions and 5 deletions
|
|
@ -878,6 +878,7 @@ gapp.register("kiri.init", [], (root, exports) => {
|
|||
ui.deviceAdd.disabled = dev.noclone;
|
||||
|
||||
api.conf.update_fields();
|
||||
space.platform.setBelt(isBelt());
|
||||
platform.update_size();
|
||||
platform.update_origin();
|
||||
platform.update();
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ gapp.register("moto.space", [], (root, exports) => {
|
|||
platformOnMove,
|
||||
platformOnMoveTime = 500,
|
||||
platformMoveTimer,
|
||||
platformBelt = false,
|
||||
volume,
|
||||
camera,
|
||||
renderer,
|
||||
|
|
@ -470,11 +471,17 @@ gapp.register("moto.space", [], (root, exports) => {
|
|||
mesh = canvas.mesh;
|
||||
if (!(context && mesh)) return;
|
||||
|
||||
for (let i = 0; i >= ruler.x1; i -= grid.unitMajor) {
|
||||
context.fillText((i * factor).round(1).toString(), ruler.xo + i + xPadding / 2, 0);
|
||||
}
|
||||
for (let i = 0; i <= ruler.x2; i += grid.unitMajor) {
|
||||
context.fillText((i * factor).round(1).toString(), ruler.xo + i + xPadding / 2, 0);
|
||||
if (platformBelt) {
|
||||
for (let i = 0; i <= ruler.x2; i += grid.unitMajor) {
|
||||
context.fillText((i * factor).round(1).toString(), ruler.x2 - i + xPadding / 2, 0);
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i >= ruler.x1; i -= grid.unitMajor) {
|
||||
context.fillText((i * factor).round(1).toString(), ruler.xo + i + xPadding / 2, 0);
|
||||
}
|
||||
for (let i = 0; i <= ruler.x2; i += grid.unitMajor) {
|
||||
context.fillText((i * factor).round(1).toString(), ruler.xo + i + xPadding / 2, 0);
|
||||
}
|
||||
}
|
||||
|
||||
context.font = (labelSize * 0.75) + 'px sans-serif';
|
||||
|
|
@ -1178,6 +1185,7 @@ gapp.register("moto.space", [], (root, exports) => {
|
|||
setHiding: (b) => { hidePlatformBelow = b },
|
||||
setZOff: (z) => { platformZOff = z; updatePlatformPosition() },
|
||||
setGridZOff:(z) => { gridZOff = z; updatePlatformPosition() },
|
||||
setBelt: (b) => { platformBelt = b },
|
||||
isHidden: () => { return !showPlatform },
|
||||
isVisible: () => { return platform.visible },
|
||||
isGridVisible() { return grid.view.visible },
|
||||
|
|
|
|||
Loading…
Reference in a new issue