#se-img-prop-dialog error class set changes

This commit is contained in:
Agriya Dev5
2020-12-09 17:14:38 +05:30
parent 375f16e0b2
commit dbe84d8dc7
2 changed files with 14 additions and 5 deletions

View File

@@ -3914,22 +3914,18 @@ editor.init = () => {
*/
const saveDocProperties = function (e) {
// set title
const {title, w, h, save} = e.detail;
const {title, w, h, save} = e.detail;
// set document title
svgCanvas.setDocumentTitle(title);
if (w !== 'fit' && !isValidUnit('width', w)) {
// width.parentElement.classList.add('error');
/* await */ $.alert(uiStrings.notification.invalidAttrValGiven);
return false;
}
// width.parentElement.classList.remove('error');
if (h !== 'fit' && !isValidUnit('height', h)) {
// height.parentElement.classList.add('error');
/* await */ $.alert(uiStrings.notification.invalidAttrValGiven);
return false;
}
// height.parentElement.classList.remove('error');
if (!svgCanvas.setResolution(w, h)) {
/* await */ $.alert(uiStrings.notification.noContentToFitTo);
return false;