minitel-standalone
Advanced tools
Comparing version 2.0.2 to 2.0.4
@@ -66,3 +66,3 @@ import { MinitelObject } from '../abstract/minitelobject.js'; | ||
const render = v.getDimensionsWrapper(inheritMe, newOptions); | ||
cumulatedHeight += render.width; | ||
cumulatedHeight += render.height; | ||
return [v, render]; | ||
@@ -69,0 +69,0 @@ }); |
@@ -16,25 +16,13 @@ // You expected a testsuite? | ||
let possibleText = new TextNode('Current focus:', {}, minitel); | ||
const firstOne = new Focusable([ | ||
new XJoin([new TextNode('AB', {}, minitel)], { height: 5, invert: true, widthAlign: 'middle', heightAlign: 'middle' }, minitel), | ||
], { autofocus: true, onFocus() { | ||
firstOne.scrollIntoView(); | ||
possibleText.text = 'Current focus: First one'; | ||
const thisMany = Array.from({ length: 20 }, (v, i) => new Focusable([ | ||
new XJoin([new TextNode(i.toString(), {}, minitel)], { height: 1, invert: true, widthAlign: 'middle', heightAlign: 'middle' }, minitel), | ||
], { autofocus: i === 0, onFocus() { | ||
thisMany[i].scrollIntoView(); | ||
possibleText.text = `Current focus: ${i}nth one`; | ||
console.log(possibleText.text); | ||
minitel.queueImmediateRenderToStream(); | ||
} }, minitel); | ||
const secondOne = new Focusable([ | ||
new XJoin([new TextNode('BA', {}, minitel)], { height: 5, heightAlign: 'middle', widthAlign: 'middle' }, minitel), | ||
], { onFocus() { | ||
secondOne.scrollIntoView(); | ||
possibleText.text = 'Current focus: Second one'; | ||
console.log(possibleText.text); | ||
minitel.queueImmediateRenderToStream(); | ||
} }, minitel); | ||
; | ||
} }, minitel)); | ||
minitel.appendChild(new YJoin([ | ||
new Scrollable([ | ||
new YJoin([ | ||
firstOne, | ||
secondOne, | ||
], {}, minitel) | ||
new YJoin(thisMany, {}, minitel) | ||
], { width: 10, height: 5, overflowX: 'hidden', overflowY: 'noscrollbar', disabled: true }, minitel), | ||
@@ -46,6 +34,4 @@ possibleText, | ||
gap: 1, | ||
doubleHeight: true, | ||
doubleWidth: true, | ||
}, minitel)); | ||
minitel.queueImmediateRenderToStream(); | ||
}); |
{ | ||
"name": "minitel-standalone", | ||
"version": "2.0.2", | ||
"version": "2.0.4", | ||
"description": "A standalone package for minitel components", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -91,3 +91,3 @@ import { MinitelObject } from '../abstract/minitelobject.js'; | ||
const render = v.getDimensionsWrapper(inheritMe, newOptions); | ||
cumulatedHeight += render.width; | ||
cumulatedHeight += render.height; | ||
return [v, render]; | ||
@@ -94,0 +94,0 @@ }); |
@@ -23,25 +23,14 @@ // You expected a testsuite? | ||
const firstOne = new Focusable([ | ||
new XJoin([new TextNode('AB', {}, minitel)], { height: 5, invert: true, widthAlign: 'middle', heightAlign: 'middle' }, minitel), | ||
], { autofocus: true, onFocus() { | ||
firstOne.scrollIntoView(); | ||
possibleText.text = 'Current focus: First one'; | ||
const thisMany: Focusable[] = Array.from({ length: 20 }, (v, i) => new Focusable([ | ||
new XJoin([new TextNode(i.toString(), {}, minitel)], { height: 1, invert: true, widthAlign: 'middle', heightAlign: 'middle' }, minitel), | ||
], { autofocus: i === 0, onFocus() { | ||
thisMany[i].scrollIntoView(); | ||
possibleText.text = `Current focus: ${i}nth one`; | ||
console.log(possibleText.text); | ||
minitel.queueImmediateRenderToStream(); | ||
} }, minitel); | ||
const secondOne = new Focusable([ | ||
new XJoin([new TextNode('BA', {}, minitel)], { height: 5, heightAlign: 'middle', widthAlign: 'middle' }, minitel), | ||
], { onFocus() { | ||
secondOne.scrollIntoView(); | ||
possibleText.text = 'Current focus: Second one'; | ||
console.log(possibleText.text); | ||
minitel.queueImmediateRenderToStream(); | ||
} }, minitel);; | ||
} }, minitel)); | ||
minitel.appendChild(new YJoin([ | ||
new Scrollable([ | ||
new YJoin([ | ||
firstOne, | ||
secondOne, | ||
], {}, minitel) | ||
new YJoin(thisMany, {}, minitel) | ||
], { width: 10, height: 5, overflowX: 'hidden', overflowY: 'noscrollbar', disabled: true }, minitel), | ||
@@ -53,4 +42,2 @@ possibleText, | ||
gap: 1, | ||
doubleHeight: true, | ||
doubleWidth: true, | ||
}, minitel)); | ||
@@ -57,0 +44,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
258467
5479