mirror of
https://github.com/adobe/brackets.git
synced 2024-11-20 09:53:00 +01:00
Only fire event when there is an adjustment in font size
This commit is contained in:
parent
479ba7b8ef
commit
1547c8b6e5
@ -120,7 +120,10 @@ define(function (require, exports, module) {
|
||||
delta = /em$/.test(oldFontSize) ? 10 : 1;
|
||||
newFontSize = $(".CodeMirror").css("font-size");
|
||||
adjustment = parseInt((parseFloat(newFontSize) - parseFloat(oldFontSize)) * delta, 10);
|
||||
$(exports).triggerHandler("fontSizeChange", [adjustment, newFontSize]);
|
||||
|
||||
if (adjustment) {
|
||||
$(exports).triggerHandler("fontSizeChange", [adjustment, newFontSize]);
|
||||
}
|
||||
|
||||
// Calculate the new scroll based on the old font sizes and scroll position
|
||||
var newWidth = editor._codeMirror.defaultCharWidth(),
|
||||
|
Loading…
Reference in New Issue
Block a user