Skip to content

Commit

Permalink
image button only handle img:not([data-non-image])
Browse files Browse the repository at this point in the history
  • Loading branch information
tinyfive committed May 13, 2014
1 parent edd2abd commit f245c76
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions lib/simditor-all.js

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

4 changes: 2 additions & 2 deletions lib/simditor.js

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

4 changes: 2 additions & 2 deletions site/assets/scripts/simditor-all.js

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

4 changes: 2 additions & 2 deletions src/buttons/image.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ class ImageButton extends Button
@maxHeight = @editor.opts.maxImageHeight || $(window).height()

@editor.on 'decorate', (e, $el) =>
$el.find('img').each (i, img) =>
$el.find('img:not([data-non-image])').each (i, img) =>
@decorate $(img)

@editor.on 'undecorate', (e, $el) =>
$el.find('img').each (i, img) =>
$el.find('img:not([data-non-image])').each (i, img) =>
@undecorate $(img)

@editor.body.on 'mousedown', '.simditor-image', (e) =>
Expand Down
4 changes: 2 additions & 2 deletions src/simditor.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2594,11 +2594,11 @@ class ImageButton extends Button
@maxHeight = @editor.opts.maxImageHeight || $(window).height()

@editor.on 'decorate', (e, $el) =>
$el.find('img').each (i, img) =>
$el.find('img:not([data-non-image])').each (i, img) =>
@decorate $(img)

@editor.on 'undecorate', (e, $el) =>
$el.find('img').each (i, img) =>
$el.find('img:not([data-non-image])').each (i, img) =>
@undecorate $(img)

@editor.body.on 'mousedown', '.simditor-image', (e) =>
Expand Down

0 comments on commit f245c76

Please sign in to comment.