Skip to content
Permalink
Browse files

Merge branch 't/10832' into major

  • Loading branch information...
oleq committed Oct 3, 2013
2 parents 0293957 + ed74483 commit 82f619ad6fd5619873eb17bc446a3793e56921fc
Showing with 4 additions and 13 deletions.
  1. +4 −13 plugins/image2/plugin.js
@@ -212,16 +212,9 @@
height: image.getAttribute( 'height' ) || ''
};

// If element was marked as centered when upcasting, update
// the alignment both visually and in widget data.
if ( this.element.data( 'cke-centered' ) ) {
this.element.data( 'cke-centered', false );
data.align = 'center';
}

// Otherwise, read initial float style from figure/image and
// Read initial float style from figure/image and
// then remove it. This style will be set on wrapper in #data listener.
else {
if ( !data.align ) {
data.align = this.element.getStyle( 'float' ) || image.getStyle( 'float' ) || 'none';
this.element.removeStyle( 'float' );
image.removeStyle( 'float' );
@@ -434,7 +427,7 @@
// Creates widgets from all <img> and <figure class="caption">.
//
// @param {CKEDITOR.htmlParser.element} el
function upcastWidgetElement( el ) {
function upcastWidgetElement( el, data ) {
var dimensions = { width:1,height:1 },
name = el.name,
image;
@@ -453,9 +446,7 @@
el = figure;
}

// Mark the element as centered, so widget.data.align
// can be correctly filled on init.
el.attributes[ 'data-cke-centered' ] = true;
data.align = 'center';

image = el.getFirst( 'img' );
}

0 comments on commit 82f619a

Please sign in to comment.
You can’t perform that action at this time.