Skip to content

Commit

Permalink
version up: 2.7.1 - align image rotate
Browse files Browse the repository at this point in the history
  • Loading branch information
JiHong88 committed Nov 5, 2018
1 parent 23e7a90 commit 866eaec
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "suneditor",
"version": "2.7.0",
"version": "2.7.1",
"description": "Pure JavaScript based WYSIWYG web editor",
"main": "src/suneditor.js",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion dist/suneditor.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sideEffects": [
"./src/assets/css/*.css"
],
"version": "2.7.0",
"version": "2.7.1",
"description": "Pure JavaScript based WYSIWYG web editor",
"main": "src/suneditor.js",
"keywords": [
Expand Down
6 changes: 4 additions & 2 deletions src/plugins/dialog/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,9 @@ export default {
contextImage._element = element;
contextImage._cover = this.util.getParentElement(element, '.sun-editor-figure-cover');
contextImage._container = this.util.getParentElement(element, '.sun-editor-id-image-container');
contextImage._caption = this.util.getChildElement(this.util.getParentElement(element, '.sun-editor-figure-cover'), 'FIGCAPTION');
contextImage._caption = this.util.getChildElement(contextImage._cover, 'FIGCAPTION');

contextImage._align = element.getAttribute('data-align') || 'none';

contextImage._element_w = size.w;
contextImage._element_h = size.h;
Expand All @@ -502,7 +504,7 @@ export default {
contextImage.altText.value = contextImage._element.alt;
contextImage.imgLink.value = contextImage._linkElement === null ? '' : contextImage._linkElement.href;
contextImage.imgLinkNewWindowCheck.checked = contextImage._linkElement && contextImage._linkElement.target === '_blank';
contextImage.modal.querySelector('input[name="suneditor_image_radio"][value="' + (contextImage._element.getAttribute('data-align') || 'none') + '"]').checked = true;
contextImage.modal.querySelector('input[name="suneditor_image_radio"][value="' + contextImage._align + '"]').checked = true;
contextImage._captionChecked = contextImage.captionCheckEl.checked = !!contextImage._caption;
contextImage.proportion.checked = contextImage._proportionChecked = contextImage._element.getAttribute('data-proportion') === 'true';
contextImage.imageX.value = contextImage._element.offsetWidth;
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/dialog/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ export default {
contextVideo._caption = this.util.getChildElement(contextVideo._cover, 'FIGCAPTION');
contextVideo._resizingDiv = this.util.getChildElement(contextVideo._cover, '.sun-editor-id-iframe-inner-resizing-cover');

contextVideo._align = element.getAttribute('data-align') || 'none';

contextVideo._element_w = size.w;
contextVideo._element_h = size.h;
contextVideo._element_t = size.t;
Expand All @@ -281,7 +283,7 @@ export default {
contextVideo._captionChecked = contextVideo.captionCheckEl.checked = !!contextVideo._caption;
contextVideo.proportion.checked = contextVideo._proportionChecked = contextVideo._element.getAttribute('data-proportion') === 'true';
contextVideo.proportion.disabled = false;
contextVideo.modal.querySelector('input[name="suneditor_video_radio"][value="' + (contextVideo._element.getAttribute('data-align') || 'none') + '"]').checked = true;
contextVideo.modal.querySelector('input[name="suneditor_video_radio"][value="' + contextVideo._align + '"]').checked = true;

this.plugins.dialog.openDialog.call(this, 'video', null, true);
},
Expand Down

0 comments on commit 866eaec

Please sign in to comment.