lexgui 0.5.1 → 0.5.3
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/audio.js +7 -7
- package/build/components/codeeditor.js +4 -4
- package/build/components/nodegraph.js +3 -3
- package/build/components/timeline.js +2 -2
- package/build/lexgui.css +445 -518
- package/build/lexgui.js +654 -439
- package/build/lexgui.min.css +4 -3
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +654 -439
- package/build/lexgui.module.min.js +1 -1
- package/build/utilities.css +215 -0
- package/changelog.md +28 -1
- package/demo.js +94 -39
- package/examples/all_widgets.html +368 -0
- package/examples/area_tabs.html +94 -86
- package/examples/asset_view.html +183 -180
- package/examples/code_editor.html +62 -61
- package/examples/dialogs.html +97 -94
- package/examples/immediate_ui.html +44 -42
- package/examples/index.html +4 -7
- package/examples/node_graph.html +39 -36
- package/examples/previews/all_widgets.png +0 -0
- package/examples/side_bar.html +93 -90
- package/examples/timeline.html +4 -4
- package/examples/video_editor.html +38 -35
- package/examples/video_editor2.html +84 -79
- package/package.json +1 -1
|
@@ -33,6 +33,11 @@ class Knob extends LX.Widget {
|
|
|
33
33
|
LX.Widget._dispatchEvent( innerKnobCircle, "change", skipCallback );
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
+
this.onResize = ( rect ) => {
|
|
37
|
+
const realNameWidth = ( this.root.domName?.offsetWidth ?? 0 );
|
|
38
|
+
container.style.width = `calc( 100% - ${ realNameWidth }px)`;
|
|
39
|
+
};
|
|
40
|
+
|
|
36
41
|
const snapEnabled = ( options.snap && options.snap.constructor == Number );
|
|
37
42
|
const ticks = [];
|
|
38
43
|
if( snapEnabled )
|
|
@@ -48,7 +53,6 @@ class Knob extends LX.Widget {
|
|
|
48
53
|
container.className = "lexknob";
|
|
49
54
|
container.addClass( options.size );
|
|
50
55
|
container.addClass( snapEnabled ? "show-ticks" : null );
|
|
51
|
-
container.style.width = options.inputWidth || "calc( 100% - " + LX.DEFAULT_NAME_WIDTH + ")";
|
|
52
56
|
|
|
53
57
|
let knobCircle = document.createElement( 'div' );
|
|
54
58
|
knobCircle.className = "knobcircle";
|
|
@@ -181,14 +185,10 @@ class Knob extends LX.Widget {
|
|
|
181
185
|
}
|
|
182
186
|
|
|
183
187
|
container.appendChild( knobCircle );
|
|
188
|
+
|
|
184
189
|
this.root.appendChild( container );
|
|
185
190
|
|
|
186
|
-
|
|
187
|
-
if( !this.name )
|
|
188
|
-
{
|
|
189
|
-
this.root.className += " noname";
|
|
190
|
-
container.style.width = "100%";
|
|
191
|
-
}
|
|
191
|
+
LX.doAsync( this.onResize.bind( this ) );
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
|
|
@@ -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
|
}
|
|
@@ -101,7 +101,7 @@ class Timeline {
|
|
|
101
101
|
|
|
102
102
|
this.root = new LX.Area({className : 'lextimeline'});
|
|
103
103
|
|
|
104
|
-
this.header_offset =
|
|
104
|
+
this.header_offset = 48;
|
|
105
105
|
|
|
106
106
|
let width = options.width ? options.width : null;
|
|
107
107
|
let height = options.height ? options.height - this.header_offset : null;
|
|
@@ -255,7 +255,7 @@ class Timeline {
|
|
|
255
255
|
}, { title: "Settings" })
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
header.endLine();
|
|
258
|
+
header.endLine( "justify-around" );
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
/**
|