Skip to content

Commit c37bb83

Browse files
author
javiercordero
committed
UX improvements
1 parent 9b759b6 commit c37bb83

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

css/editor.css

+8-4
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,16 @@ a:active {
280280
z-index: 0;
281281
}
282282

283-
/*img.cke_anchor {
284-
width: 0;
283+
/* Hide empty cke_anchor error, does not affect jumping. */
284+
img.cke_anchor {
285+
display: none;
286+
}
287+
288+
/* Remove CKE anchor padding. */
289+
#prompt a {
285290
padding: 0;
286-
margin: 0;
287291
}
288-
*/
292+
289293
/* Sidebar Styles */
290294
#sidebar-connect p {
291295
color: #999999;

index.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,10 @@ <h3>Here are some of our features:</h3>
196196
<li>Dynamically change the font-size by pressing 'Left' and 'Right' or the 'A' and 'D' keys.</li>
197197
<li>Flip modes allow <em>mirroring</em> the prompter in every possible way.</li>
198198
<li>You can use one or two instances. Mirror one, monitor on the other one.</li>
199-
<li><a id="5" name="5">Set almost any key as an <em>anchor</em> and instantly jump to any part of the script. Try pressing '5' now!</a></li>
199+
<li><a id="5" name="5">Set almost any key as a <em>marker</em> and instantly jump to any part of the script. Try pressing '5' now!</a></li>
200200
<li>Different focus areas allow you to easily use Teleprompter with a webcam, a tablet, or professional teleprompter equipment.</li>
201201
<li>Time your segments with the built in <em>timer</em>. Press 'Backspace' to reset the timer.</li>
202+
<li><a>You can also set nameless <em>markers</em> and move accross them using the Home and End buttons.</a></li>
202203
<li>Tweak the <em>Speed</em>, <em>Acceleration Curve</em> and <em>Font Size</em> settings to fit your hosts' needs.</li>
203204
<li>The Rich Text Editor, derived from the highly customizable CKeditor, gives unlimited possibilities on what you can prompt.</li>
204205
<ul>
@@ -222,9 +223,9 @@ <h3>Here are some of our features:</h3>
222223
<img alt="Picture: Arecibo Sky" src="img/arecibo-sky.jpg">
223224
</li>
224225
</ul>
225-
<li>There are various <em>Prompter Styles</em> to choose from. You may also create your own.</li>
226226
<li>Press 'F11' to enter and leave fullscreen.
227227
You may fullscreen the text editor for greater concentration.</li>
228+
<li>There are various <em>Prompter Styles</em> to choose from. You may also create your own.</li>
228229
<!-- <li>Download our mobile app, <em>Teleprompter X</em>, to remote control Teleprompter instalations.</li> -->
229230
<li>Run the "External prompter" on a second screen, add new contents into the editor, then "Update" your prompter in realtime without having to halt your script.</li>
230231
<li>Teleprompter works across screens with different resolutions and aspect ratios.</li>

js/teleprompter.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -672,13 +672,13 @@ https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/onversionchange
672672
}
673673

674674
function internalMoveToNextAnchor(next) {
675-
// Setup
676675
const anchors = document.getElementsByTagName("a"),
677676
currPos = -getCurrPos(),
678677
verticalDisplacement = focusVerticalDisplacementCorrector();
679678
let jump = 0;
680679
if (debug) console.log("currPos", currPos);
681680
if (next)
681+
// Check flipV before loop to reduce cycles.
682682
if (flipV) {
683683
jump = -promptHeight + screenHeight;
684684
for (let i=0; i<anchors.length; i++) {
@@ -700,8 +700,8 @@ https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/onversionchange
700700
}
701701
}
702702
else {
703-
// Add 20% padding (screenWidth/5) to jump to previous evaluations.
704-
const padding = x&&!next>=0?screenWidth/5:0;
703+
// Add width based padding when jumping to previous evaluations.
704+
const padding = x&&!next>=0?screenWidth/4.8:0;
705705
if (flipV) {
706706
jump = -promptHeight + screenHeight;
707707
for (let i=anchors.length-1; i>=0; i--) {
@@ -723,6 +723,7 @@ https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/onversionchange
723723
}
724724
}
725725
}
726+
// Move within movable area or from top to start.
726727
if (!flipV && jump < 0 || flipV && jump > -promptHeight + screenHeight || !flipV && !next || flipV && !next )
727728
animate(0, jump);
728729
resumeAnimation();
@@ -867,14 +868,14 @@ https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/onversionchange
867868
function internalIncreaseFontSize() {
868869
if (debug) console.log("Increasing font size.");
869870
if (fontSize<2.5)
870-
fontSize+=0.05;
871+
fontSize+=0.04;
871872
updateFont();
872873
}
873874

874875
function internalDecreaseFontSize() {
875876
if (debug) console.log("Decreasing font size.");
876-
if (fontSize>0.5)
877-
fontSize-=0.05;
877+
if (fontSize>0.01)
878+
fontSize-=0.04;
878879
updateFont();
879880
}
880881

0 commit comments

Comments
 (0)