Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented Line Height #5

Merged
merged 6 commits into from
Oct 22, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removing alterposition
Shubhamverma2796 committed Aug 17, 2022
commit 3fae60a55def50f98d607ce0c3d9b5524eaaf02b
2 changes: 1 addition & 1 deletion dist/accessibility.min.js

Large diffs are not rendered by default.

71 changes: 3 additions & 68 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -154,7 +154,6 @@ export class Accessibility {
underlineLinks: false,
bigCursor: false,
readingGuide: false,
position: 'right',
};
if (this.options.icon.useEmojis) {
this.fontFallback();
@@ -758,32 +757,6 @@ export class Accessibility {
text: this.options.labels.speechToText
}
]
},
{
type: 'li',
attrs: {
'data-access-action': 'leftPosition',
'class' : 'position',
},
children: [
{
type: '#text',
text: "Left Position"
}
]
},
{
type: 'li',
attrs: {
'data-access-action': 'rightPosition',
'class' : 'position',
},
children: [
{
type: '#text',
text: "Right Position"
}
]
}
]
},
@@ -982,35 +955,7 @@ export class Accessibility {
}
}
}

alterPosition(shiftLeft) {
if(shiftLeft && this.options.icon.position.right) {
delete this.options.icon.position.right;
this.options.icon.position.left = {
size: 10,
units: 'px' ,
}
this.build();
this.destroy();

document.querySelector('._access-menu [data-access-action="leftPosition"]').classList.toggle('active');
// this.sessionState.position = 'right';
} else {
if(this.options.icon.position.left && !shiftLeft) {
delete this.options.icon.position.left;
this.options.icon.position.right = {
size: 10,
units: 'px' ,
}
this.build();
this.destroy();

document.querySelector('._access-menu [data-access-action="rightPosition"]').classList.toggle('active');
}
}
console.log(this.options.textSize);
this.onChange(true);
}

alterTextSpace(isIncrease) {
this.sessionState.textSpace += isIncrease ? 1 : -1;
this.onChange(true);
@@ -1278,13 +1223,7 @@ export class Accessibility {
decreaseLineHeight: () => {
this.alterLineHeight(false);
},
leftPosition: () => {
this.alterPosition(true);
},
rightPosition: () => {
this.alterPosition(false);
},


invertColors: (destroy) => {
if (typeof this.initialValues.html.backgroundColor === 'undefined')
this.initialValues.html.backgroundColor = getComputedStyle(this.html).backgroundColor;
@@ -1612,11 +1551,7 @@ export class Accessibility {
}
}
}
// if(this.sessionState.position == 'left'){
// this.alterPosition(false);
// } else {
// this.alterPosition(true);
// }

if (sessionState.invertColors)
this.menuInterface.invertColors();
if (sessionState.grayHues)