uil 4.4.0 → 4.4.1
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/uil.js +45 -6
- package/build/uil.min.js +1 -1
- package/build/uil.module.js +1 -1
- package/package.json +1 -1
package/build/uil.js
CHANGED
|
@@ -88,6 +88,21 @@
|
|
|
88
88
|
|
|
89
89
|
now: null,
|
|
90
90
|
|
|
91
|
+
injectCss (css, styleName, parent) {
|
|
92
|
+
const CSS_ID = styleName || 'codeflask-style';
|
|
93
|
+
const PARENT = parent || document.head;
|
|
94
|
+
|
|
95
|
+
if (!css) return false
|
|
96
|
+
|
|
97
|
+
if (document.getElementById(CSS_ID)) return true
|
|
98
|
+
|
|
99
|
+
const style = document.createElement('style');
|
|
100
|
+
style.innerHTML = css;
|
|
101
|
+
style.id = CSS_ID;
|
|
102
|
+
PARENT.appendChild(style);
|
|
103
|
+
return true
|
|
104
|
+
},
|
|
105
|
+
|
|
91
106
|
|
|
92
107
|
|
|
93
108
|
getTime: function() {
|
|
@@ -495,7 +510,9 @@
|
|
|
495
510
|
|
|
496
511
|
u = R.ui[i];
|
|
497
512
|
R.getZone( u );
|
|
498
|
-
|
|
513
|
+
|
|
514
|
+
// TODO need for group open at start !!!
|
|
515
|
+
if( u.isGui ) u.calcUis();
|
|
499
516
|
|
|
500
517
|
}
|
|
501
518
|
|
|
@@ -505,6 +522,8 @@
|
|
|
505
522
|
|
|
506
523
|
onZone: function ( o, x, y ) {
|
|
507
524
|
|
|
525
|
+
//console.log(o, x, y)
|
|
526
|
+
|
|
508
527
|
if( x === undefined || y === undefined ) return false;
|
|
509
528
|
|
|
510
529
|
let z = o.zone;
|
|
@@ -925,6 +944,7 @@
|
|
|
925
944
|
* @author lth / https://github.com/lo-th
|
|
926
945
|
*/
|
|
927
946
|
|
|
947
|
+
//import { PixelFont } from './PixelFont.js';
|
|
928
948
|
|
|
929
949
|
const T = {
|
|
930
950
|
|
|
@@ -977,6 +997,8 @@
|
|
|
977
997
|
|
|
978
998
|
defineColor: ( o, cc = T.colors ) => {
|
|
979
999
|
|
|
1000
|
+
//Roots.injectCss(PixelFont, null)
|
|
1001
|
+
|
|
980
1002
|
let color = { ...cc };
|
|
981
1003
|
|
|
982
1004
|
let textChange = ['fontFamily', 'fontWeight', 'fontShadow', 'fontSize' ];
|
|
@@ -1076,12 +1098,13 @@
|
|
|
1076
1098
|
|
|
1077
1099
|
//fontFamily: 'Tahoma',
|
|
1078
1100
|
//fontFamily: 'Consolas, monospace',
|
|
1079
|
-
fontFamily:"'SegoeUI', 'Segoe UI', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif",
|
|
1101
|
+
//fontFamily:"'SegoeUI', 'Segoe UI', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif",
|
|
1102
|
+
fontFamily:"Roboto Mono, Source Code Pro, Menlo, Courier, monospace",
|
|
1080
1103
|
|
|
1081
1104
|
//fontFamily: "'Roboto Mono', 'Source Code Pro', Menlo, Courier, monospace",
|
|
1082
1105
|
fontWeight: 'normal',
|
|
1083
1106
|
fontShadow: 'none',//'#000',
|
|
1084
|
-
fontSize:
|
|
1107
|
+
fontSize:11,
|
|
1085
1108
|
|
|
1086
1109
|
joyOver:'rgba(48,138,255,0.25)',
|
|
1087
1110
|
joyOut: 'rgba(100,100,100,0.5)',
|
|
@@ -1185,7 +1208,7 @@
|
|
|
1185
1208
|
|
|
1186
1209
|
//let align = 'display:flex; justify-content:left; align-items:center; text-align:left;'
|
|
1187
1210
|
|
|
1188
|
-
T.css.txt = T.css.basic + T.css.middle + ' font-family:'+ font +'; font-weight:'+weight+'; font-size:'+size+'; color:'+cc.text+'; padding:0px 8px; left:0; top:2px; height:16px; width:100px; overflow:hidden; white-space: nowrap; letter-spacing:
|
|
1211
|
+
T.css.txt = T.css.basic + T.css.middle + ' font-family:'+ font +'; font-weight:'+weight+'; font-size:'+size+'; color:'+cc.text+'; padding:0px 8px; left:0; top:2px; height:16px; width:100px; overflow:hidden; white-space: nowrap; letter-spacing:normal;';//letter-spacing: normal;
|
|
1189
1212
|
if( shadow !== 'none' ) T.css.txt += ' text-shadow: 1px 1px 1px '+shadow+';';
|
|
1190
1213
|
|
|
1191
1214
|
T.css.txtselect = T.css.txt + 'padding:0px 4px; border:1px dashed ' + cc.border + ';';
|
|
@@ -4691,7 +4714,16 @@
|
|
|
4691
4714
|
|
|
4692
4715
|
//console.log(this.margin)
|
|
4693
4716
|
|
|
4694
|
-
if( o.open )
|
|
4717
|
+
if( o.open ){
|
|
4718
|
+
//setTimeout( this.open.bind(this), 100 )
|
|
4719
|
+
this.open();
|
|
4720
|
+
|
|
4721
|
+
//if(this.isUI) this.main.calcUis();
|
|
4722
|
+
//this.rezone()
|
|
4723
|
+
//Roots.needReZone = true;
|
|
4724
|
+
//Roots.resize();
|
|
4725
|
+
//this.calcUis()
|
|
4726
|
+
}
|
|
4695
4727
|
|
|
4696
4728
|
}
|
|
4697
4729
|
|
|
@@ -4733,6 +4765,8 @@
|
|
|
4733
4765
|
|
|
4734
4766
|
testZone ( e ) {
|
|
4735
4767
|
|
|
4768
|
+
//console.log( this.local)
|
|
4769
|
+
|
|
4736
4770
|
let l = this.local;
|
|
4737
4771
|
if( l.x === -1 && l.y === -1 ) return '';
|
|
4738
4772
|
|
|
@@ -4743,7 +4777,7 @@
|
|
|
4743
4777
|
if( this.isOpen ) name = 'content';
|
|
4744
4778
|
}
|
|
4745
4779
|
|
|
4746
|
-
|
|
4780
|
+
|
|
4747
4781
|
|
|
4748
4782
|
return name;
|
|
4749
4783
|
|
|
@@ -4789,6 +4823,8 @@
|
|
|
4789
4823
|
|
|
4790
4824
|
case 'content':
|
|
4791
4825
|
|
|
4826
|
+
|
|
4827
|
+
|
|
4792
4828
|
//this.cursor()
|
|
4793
4829
|
|
|
4794
4830
|
//if( this.marginDiv ) e.clientY -= this.margin * 0.5
|
|
@@ -4826,6 +4862,8 @@
|
|
|
4826
4862
|
|
|
4827
4863
|
let next = Roots.findTarget( this.uis, e );
|
|
4828
4864
|
|
|
4865
|
+
|
|
4866
|
+
|
|
4829
4867
|
if( next !== this.current ){
|
|
4830
4868
|
this.clearTarget();
|
|
4831
4869
|
this.current = next;
|
|
@@ -5043,6 +5081,7 @@
|
|
|
5043
5081
|
|
|
5044
5082
|
parentHeight ( t ) {
|
|
5045
5083
|
|
|
5084
|
+
|
|
5046
5085
|
if ( this.group !== null ) this.group.calc( t );
|
|
5047
5086
|
else if ( this.isUI ) this.main.calc( t );
|
|
5048
5087
|
|