Skip to content

Commit 55d7aa3

Browse files
committed
🚸 Minor patch for panel title text wrapping
This should probably be removed later?
1 parent 57eaf65 commit 55d7aa3

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { PACKAGE } from '@aj/constants'
2+
import { createBlockbenchMod } from '@aj/util/moddingTools'
3+
4+
/**
5+
* Makes the text in panel titles clip instead of wrapping
6+
*/
7+
createBlockbenchMod(
8+
`${PACKAGE.name}:panelTitleTextWrap`,
9+
{
10+
css: undefined as Deletable | undefined,
11+
},
12+
ctx => {
13+
ctx.css = Blockbench.addCSS(`
14+
.panel_handle label {
15+
text-overflow: ellipsis;
16+
text-wrap-mode: nowrap;
17+
}
18+
`)
19+
return ctx
20+
},
21+
ctx => {
22+
ctx.css?.delete()
23+
}
24+
)

src/blockbench-mods/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import './action/saveProject'
88
import './action/saveProjectAs'
99
// Class Properties
1010
import './class-properties/animationProperties'
11+
// CSS
12+
import './css/panelTitleTextWrap'
1113
// Function Overwrites
1214
import './function-overwrites/blockbenchRead'
1315
import './function-overwrites/reverseKeyframes'

0 commit comments

Comments
 (0)