Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/view/ViewCommandHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global define, window, $ */

/**
* The ViewCommandHandlers object dispatches the following event(s):
* - adjustFontSize -- Triggered when the font size is adjusted via the
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming nit: in general we name events like this by adding "change" to the end of the thing changing, so fontSizeChange would be a better name.

* Increase Font Size, Decrease Font Size, or Restore Font Size commands.
* The 2nd arg to the listener is the amount of the adjustment. The 3rd
* arg is a string containing the new font size after applying the adjustment.
* The 4th arg is a string containing the new line height after applying the
* adjustment.
*/

define(function (require, exports, module) {
"use strict";

Expand Down Expand Up @@ -174,6 +184,7 @@ define(function (require, exports, module) {

_setSizeAndRestoreScroll(fsStr, lhStr);

$(exports).triggerHandler("adjustFontSize", [adjustment, fsStr, lhStr]);
return true;
}

Expand Down