lexgui 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/codeeditor.js +4 -4
- package/build/components/nodegraph.js +3 -3
- package/build/components/timeline.js +37 -17
- package/build/lexgui.css +186 -82
- package/build/lexgui.js +814 -465
- package/build/lexgui.min.css +1 -1
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +814 -465
- package/build/lexgui.module.min.js +1 -1
- package/changelog.md +29 -1
- package/package.json +1 -1
|
@@ -1536,8 +1536,8 @@ class CodeEditor {
|
|
|
1536
1536
|
|
|
1537
1537
|
panel.sameLine();
|
|
1538
1538
|
panel.addLabel( this.code.title, { float: 'right', signal: "@tab-name" });
|
|
1539
|
-
panel.addLabel( "Ln " + 1, {
|
|
1540
|
-
panel.addLabel( "Col " + 1, {
|
|
1539
|
+
panel.addLabel( "Ln " + 1, { xmaxWidth: "48px", signal: "@cursor-line" });
|
|
1540
|
+
panel.addLabel( "Col " + 1, { xmaxWidth: "48px", signal: "@cursor-pos" });
|
|
1541
1541
|
panel.addButton( null, "Spaces: " + this.tabSpaces, ( value, event ) => {
|
|
1542
1542
|
LX.addContextMenu( "Spaces", event, m => {
|
|
1543
1543
|
const options = [ 2, 4, 8 ];
|
|
@@ -1548,7 +1548,7 @@ class CodeEditor {
|
|
|
1548
1548
|
this._updateDataInfoPanel( "@tab-spaces", "Spaces: " + this.tabSpaces );
|
|
1549
1549
|
} );
|
|
1550
1550
|
});
|
|
1551
|
-
}, {
|
|
1551
|
+
}, { nameWidth: "15%", signal: "@tab-spaces" });
|
|
1552
1552
|
panel.addButton( "<b>{ }</b>", this.highlight, ( value, event ) => {
|
|
1553
1553
|
LX.addContextMenu( "Language", event, m => {
|
|
1554
1554
|
for( const lang of Object.keys( this.languages ) )
|
|
@@ -1558,7 +1558,7 @@ class CodeEditor {
|
|
|
1558
1558
|
} );
|
|
1559
1559
|
}
|
|
1560
1560
|
});
|
|
1561
|
-
}, {
|
|
1561
|
+
}, { nameWidth: "15%", signal: "@highlight" });
|
|
1562
1562
|
panel.endLine();
|
|
1563
1563
|
|
|
1564
1564
|
return panel;
|
|
@@ -1965,7 +1965,7 @@ class GraphEditor {
|
|
|
1965
1965
|
for( let node of nodesOutsideViewport )
|
|
1966
1966
|
{
|
|
1967
1967
|
let dom = this._getNodeDOMElement( node.id );
|
|
1968
|
-
dom.classList.toggle( '
|
|
1968
|
+
dom.classList.toggle( 'hidden-opacity', true );
|
|
1969
1969
|
}
|
|
1970
1970
|
}
|
|
1971
1971
|
|
|
@@ -2397,10 +2397,10 @@ class GraphEditor {
|
|
|
2397
2397
|
if( graph_bb.inside( node_bb, false ) )
|
|
2398
2398
|
{
|
|
2399
2399
|
// Show if node in viewport..
|
|
2400
|
-
dom.classList.toggle( '
|
|
2400
|
+
dom.classList.toggle( 'hidden-opacity', false );
|
|
2401
2401
|
|
|
2402
2402
|
// And hide content if scale is very small..
|
|
2403
|
-
dom.childNodes[ 1 ].classList.toggle( '
|
|
2403
|
+
dom.childNodes[ 1 ].classList.toggle( 'hidden-opacity', this.currentGraph.scale < 0.5 );
|
|
2404
2404
|
|
|
2405
2405
|
continue;
|
|
2406
2406
|
}
|
|
@@ -169,7 +169,6 @@ class Timeline {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
let header = this.header;
|
|
172
|
-
LX.DEFAULT_NAME_WIDTH = "50%";
|
|
173
172
|
header.sameLine();
|
|
174
173
|
|
|
175
174
|
if( this.name )
|
|
@@ -177,32 +176,54 @@ class Timeline {
|
|
|
177
176
|
header.addTitle(this.name );
|
|
178
177
|
}
|
|
179
178
|
|
|
180
|
-
|
|
179
|
+
const buttonContainer = LX.makeContainer(["auto", "100%"], "", { display: "flex" });
|
|
180
|
+
|
|
181
|
+
header.queue( buttonContainer );
|
|
182
|
+
|
|
183
|
+
header.addButton("playBtn", '<i class="fa-solid fa-'+ (this.playing ? 'pause' : 'play') +'"></i>', (value, event) => {
|
|
181
184
|
this.changeState();
|
|
182
|
-
}, {
|
|
185
|
+
}, { buttonClass: "accept", title: "Play", hideName: true });
|
|
183
186
|
|
|
184
|
-
header.addButton(
|
|
187
|
+
header.addButton("toggleLoopBtn", '<i class="fa-solid fa-rotate"></i>', ( value, event ) => {
|
|
185
188
|
this.loop = !this.loop;
|
|
186
189
|
if( this.onChangePlayMode )
|
|
187
190
|
{
|
|
188
191
|
this.onChangePlayMode( this.loop );
|
|
189
192
|
}
|
|
190
|
-
}, {
|
|
193
|
+
}, { selectable: true, selected: this.loop, title: 'Loop', hideName: true });
|
|
191
194
|
|
|
192
195
|
if( this.onBeforeCreateTopBar )
|
|
193
196
|
{
|
|
194
197
|
this.onBeforeCreateTopBar( header );
|
|
195
198
|
}
|
|
196
199
|
|
|
200
|
+
header.clearQueue( buttonContainer );
|
|
201
|
+
|
|
202
|
+
header.addContent( "header-buttons", buttonContainer );
|
|
203
|
+
|
|
197
204
|
header.addNumber("Current Time", this.currentTime, (value, event) => {
|
|
198
|
-
this.setTime(value)
|
|
205
|
+
this.setTime(value)
|
|
206
|
+
}, {
|
|
207
|
+
units: "s",
|
|
208
|
+
signal: "@on_set_time_" + this.name,
|
|
209
|
+
step: 0.01, min: 0, precision: 3,
|
|
210
|
+
skipSlider: true
|
|
211
|
+
});
|
|
199
212
|
|
|
200
213
|
header.addNumber("Duration", + this.duration.toFixed(3), (value, event) => {
|
|
201
|
-
this.setDuration(value, false)
|
|
214
|
+
this.setDuration(value, false)
|
|
215
|
+
}, {
|
|
216
|
+
units: "s",
|
|
217
|
+
step: 0.01, min: 0,
|
|
218
|
+
signal: "@on_set_duration_" + this.name
|
|
202
219
|
});
|
|
203
220
|
|
|
204
221
|
header.addNumber("Speed", + this.speed.toFixed(3), (value, event) => {
|
|
205
|
-
this.setSpeed(value)
|
|
222
|
+
this.setSpeed(value)
|
|
223
|
+
}, {
|
|
224
|
+
step: 0.01,
|
|
225
|
+
signal: "@on_set_speed_" + this.name
|
|
226
|
+
});
|
|
206
227
|
|
|
207
228
|
if( this.onAfterCreateTopBar )
|
|
208
229
|
{
|
|
@@ -211,12 +232,12 @@ class Timeline {
|
|
|
211
232
|
|
|
212
233
|
if( this.onShowOptimizeMenu )
|
|
213
234
|
{
|
|
214
|
-
header.addButton(
|
|
235
|
+
header.addButton(null, '<i class="fa-solid fa-filter"></i>', (value, event) => {this.onShowOptimizeMenu(event)}, { title: "Optimize" });
|
|
215
236
|
}
|
|
216
237
|
|
|
217
238
|
if( this.onShowConfiguration )
|
|
218
239
|
{
|
|
219
|
-
header.addButton(
|
|
240
|
+
header.addButton(null, '<i class="fa-solid fa-gear"></i>', (value, event) => {
|
|
220
241
|
if(this.configurationDialog){
|
|
221
242
|
this.configurationDialog.close();
|
|
222
243
|
this.configurationDialog = null;
|
|
@@ -231,11 +252,10 @@ class Timeline {
|
|
|
231
252
|
root.remove();
|
|
232
253
|
}
|
|
233
254
|
})
|
|
234
|
-
}, {
|
|
255
|
+
}, { title: "Settings" })
|
|
235
256
|
}
|
|
236
257
|
|
|
237
|
-
header.endLine();
|
|
238
|
-
LX.DEFAULT_NAME_WIDTH = "30%";
|
|
258
|
+
header.endLine( "space-around" );
|
|
239
259
|
}
|
|
240
260
|
|
|
241
261
|
/**
|
|
@@ -263,9 +283,9 @@ class Timeline {
|
|
|
263
283
|
|
|
264
284
|
if( !this.disableNewTracks )
|
|
265
285
|
{
|
|
266
|
-
panel.addButton(
|
|
286
|
+
panel.addButton("addTrackBtn", '<i class = "fa-solid fa-plus"></i>', (value, event) => {
|
|
267
287
|
this.addNewTrack();
|
|
268
|
-
}, {
|
|
288
|
+
}, { hideName: true, title: "Add Track" });
|
|
269
289
|
}
|
|
270
290
|
|
|
271
291
|
panel.endLine();
|
|
@@ -2758,9 +2778,9 @@ class ClipsTimeline extends Timeline {
|
|
|
2758
2778
|
let title = titleWidget.root;
|
|
2759
2779
|
if(!this.disableNewTracks)
|
|
2760
2780
|
{
|
|
2761
|
-
panel.addButton(
|
|
2781
|
+
panel.addButton("addTrackBtn", '<i class = "fa-solid fa-plus"></i>', (value, event) => {
|
|
2762
2782
|
this.addNewTrack();
|
|
2763
|
-
}, {
|
|
2783
|
+
}, { hideName: true, title: "Add Track" });
|
|
2764
2784
|
}
|
|
2765
2785
|
panel.endLine();
|
|
2766
2786
|
const styles = window.getComputedStyle(title);
|