Skip to content

Commit ecd3538

Browse files
committed
Release 3.0.1 - final fine tuning
1 parent 8e646b4 commit ecd3538

6 files changed

Lines changed: 34 additions & 47 deletions

File tree

src/assets/information/tVERSION.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@
99
</p>
1010
<table class="inline-table">
1111

12+
<tr>
13+
<td valign=top>
14+
<b>3.0.1&nbsp;&nbsp;</b>
15+
</td>
16+
<td>
17+
&raquo; The icons of sub menu items are now fully visible in the mobile version.<br/>
18+
&raquo; No more flickering of colors on the progress dialog.<br/>
19+
&raquo; Implemented the menu item separators like those in the desktop version.<br/>
20+
&raquo; Implemented swipe gestures to simplify navigation between panels.<br/>
21+
&raquo; Improved <i>responsiveness</i> in the mobile version (orientation changes).<br/>
22+
</td>
23+
</tr>
24+
1225
<tr>
1326
<td valign=top>
1427
<b>3.0.0&nbsp;&nbsp;</b>

src/assets/js/container.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,11 @@ container
3939
.toFactory((context: ResolutionContext) : () => IKatexInputHelper => {
4040
return () => context.get(katexInputHelperId);
4141
});
42-
/*
43-
// Probably no longer required
44-
container
45-
.bind<ICodeMirror>(codeMirrorId)
46-
.to(CodeMirrorProxy)
47-
.inSingletonScope();
48-
*/
42+
4943
container
5044
.bind<Factory<ICodeMirror>>(codeMirrorFactoryId)
5145
.toFactory((_context: ResolutionContext) : (isMobile: boolean) => ICodeMirror => {
5246
return (isMobile: boolean) => new CodeMirrorProxy(isMobile);
53-
//return () => context.get(codeMirrorId);
5447
});
5548

5649
container.bind<KIHPanel>(dynamicPanelId).to(DynamicPanel);

src/assets/js/dialog.ts

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,6 @@ export class KatexInputHelper implements IKatexInputHelper {
371371
await vme.initialiseCodeMirror();
372372
this.localizer.subscribe(this.onLocaleChanged.bind(this));
373373
await this.localizer.initialiseLanguageChoice(this.localType); // Progress dialog uses localized text
374-
// NO ACTION on language choice dialog
375-
// await this.parser.parseAsync('#wLANGUAGE_CHOISE');
376374

377375
$.messager.progress({
378376
title: "Katex Input Helper",
@@ -397,7 +395,7 @@ export class KatexInputHelper implements IKatexInputHelper {
397395
await this.themes.initialiseThemeChoice(this.style, this.rtlStyle); // RTL STYLE defined after locale language
398396

399397
if (!this.platformInfo.isMobile) {
400-
$('#myContainer').layout({fit: true});
398+
$('#myContainer').layout({fit: true}); // myContainer is only on desktop a layout
401399
}
402400
$('#innerLayout').layout({fit: true});
403401
vme.endWait();
@@ -425,19 +423,6 @@ export class KatexInputHelper implements IKatexInputHelper {
425423
panel.panel('resize', { height: `${part}%` });
426424
$(selector).layout('resize');
427425
}
428-
429-
// Intent: to restore original web page structure (required by Joplin plugin).
430-
// Here: the viewport
431-
// TODO: required? CHECK FUNCTIONALITY WITHOUT THIS
432-
// It seems the functionality is given without this !!
433-
/*
434-
const content = $("body meta[name='viewport']").attr('content');
435-
if (content) {
436-
const html = `<meta name="viewport" content="${content}" ></meta>`;
437-
$("meta[name='viewport']").remove();
438-
$('html > head').append(html);
439-
}
440-
*/
441426

442427
// Here: the body content
443428
$('body').prepend($('#joplin-plugin-content > div'));
@@ -462,6 +447,7 @@ export class KatexInputHelper implements IKatexInputHelper {
462447

463448
console.log(`Menu4 : ${$('#main-menu').html()}`);
464449
$('body').prepend($('div:has(> .easyui-navpanel)'));
450+
465451
// Placement of "navpanels" in body initiates buggy behavior
466452
//$('body').prepend($('.easyui-navpanel'));
467453

@@ -670,15 +656,11 @@ export class KatexInputHelper implements IKatexInputHelper {
670656
let vme = this;
671657
const codeMirrorEditor = this.codeMirrorEditor;
672658
await this.versions.init(codeMirrorEditor.version);
673-
// Reserved.
674-
const option = vme.platformInfo.isMobile ? 'contenteditable' : 'textarea'; // RESERVED
675-
try { codeMirrorEditor.setOption('inputStyle', option); } catch(e) {}
659+
676660
codeMirrorEditor.on("change", function() { vme.autoUpdateOutput(); });
677661

678662
if(vme.platformInfo.isMobile) {
679663
$(vme.cmSelector).css('font-size', '1.3em');
680-
// NO ACTION on Android
681-
// $('.cm-content').attr('inputmethod', 'none');
682664
} else {
683665
/* The context menu appears but throws on click or mouse move afterwards:
684666
* NO OWNER => special handling.
@@ -793,8 +775,7 @@ export class KatexInputHelper implements IKatexInputHelper {
793775
}
794776

795777
// Configures Clicks on close buttons and Key handlers, Context menus and others
796-
/* Moved to panels : Close button click handler
797-
*/
778+
// Moved to panels : Close button click handler
798779

799780
$('#btRESET_WINDOW_POSITIONS').on('click', function(event) {
800781
event.preventDefault();
@@ -856,6 +837,8 @@ export class KatexInputHelper implements IKatexInputHelper {
856837
/**
857838
* Handles menu clicks of the main menu. This handler performs an additional
858839
* handling of the side menu.
840+
*
841+
* @param item - the clicked menu item
859842
*/
860843
async onMenuClick(item: any) {
861844
let vme = this;
@@ -926,8 +909,8 @@ export class KatexInputHelper implements IKatexInputHelper {
926909

927910
/**
928911
* Registers events for a window and opens it.
929-
*
930912
* This whole effort is done to get the window position and size persisted.
913+
* Delegated to the panels instance.
931914
*
932915
* @param id - the HTML id of the window
933916
*/
@@ -937,7 +920,6 @@ export class KatexInputHelper implements IKatexInputHelper {
937920

938921
/**
939922
* Registers events for a window and opens it.
940-
*
941923
* This whole effort is done to get the window position and size persisted.
942924
*
943925
* @param id - the HTML id of the window
@@ -1087,7 +1069,7 @@ export class KatexInputHelper implements IKatexInputHelper {
10871069

10881070
/**
10891071
* Wrapper of the appropriate Math routine. Updates the math in the
1090-
* output window.
1072+
* output window.
10911073
*/
10921074
updateOutput() {
10931075
this.math.updateOutput();
@@ -1103,16 +1085,7 @@ export class KatexInputHelper implements IKatexInputHelper {
11031085
}
11041086

11051087
/**
1106-
* OBSOLETE. NOT USED.
1107-
*
1108-
insertBeforeEachLine(b) {
1109-
this.encloseSelection("", "", function(a) { a = a.replace(/\r/g, "");
1110-
return b + a.replace(/\n/g, "\n" + b) })
1111-
}
1112-
*/
1113-
1114-
/**
1115-
* For insertion of formulae with insertion point..
1088+
* For insertion of formulae with insertion point.
11161089
*/
11171090
tag(b: any, a: any) {
11181091
b = b || null;

src/assets/js/parameters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ export class KIHParameters {
389389
} catch(e) {
390390
console.error(`Exception resizing panel ${id} : ${e}`);
391391
}
392-
} else {
392+
} else if (!this.isMobile) {
393393
console.warn(`Missing id in parameters : ${id}`);
394394
}
395395
}

src/assets/js/sass/partials/_mixins.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,15 @@
350350
font-size: 1rem * $scale;
351351

352352
>div >div {
353-
padding: 10px;
353+
padding: {
354+
top: 10px;
355+
bottom: 10px;
356+
left: 10px;
357+
}
358+
359+
div[id] {
360+
padding-right: 2px;
361+
}
354362
}
355363

356364
#tCOPYRIGHT hr, #tVERSION hr {

src/assets/js/versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"easyuiVersion": "1.11.3",
55
"katexVersion": "0.16.22",
66
"colorPickerVersion": "23/05/2009",
7-
"build": 2793,
7+
"build": 2798,
88
"jqueryVersion": "",
99
"codemirrorEditorVersion": ""
1010
}

0 commit comments

Comments
 (0)