Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Made Editor.setInlineWidgetHeight() also take a widget instead of an ID
Browse files Browse the repository at this point in the history
  • Loading branch information
njx committed Apr 4, 2012
1 parent 683ac5b commit 25fd303
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/editor/CSSInlineEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ define(function (require, exports, module) {
this.parentClass.sizeInlineWidgetToContents.call(this, force);
// Size the widget height to the max between the editor content and the related rules list
var widgetHeight = Math.max(this.$relatedContainer.find(".related").height(), this.$editorsDiv.height());
this.hostEditor.setInlineWidgetHeight(this.id, widgetHeight, true);
this.hostEditor.setInlineWidgetHeight(this, widgetHeight, true);

// The related rules container size itself based on htmlContent which is set by setInlineWidgetHeight above.
this._updateRelatedContainer();
Expand Down
12 changes: 6 additions & 6 deletions src/editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -740,13 +740,13 @@ define(function (require, exports, module) {
};

/**
* Sets the height of the inline widget for this editor. The inline editor is identified by id.
* @param {!number} id
* @param {!height} height
* @param {boolean} ensureVisible
* Sets the height of an inline widget in this editor.
* @param {!InlineWidget} inlineWidget The widget whose height should be set.
* @param {!height} height The height of the widget.
* @param {boolean} ensureVisible Whether to scroll the entire widget into view.
*/
Editor.prototype.setInlineWidgetHeight = function (id, height, ensureVisible) {
this._codeMirror.setInlineWidgetHeight(id, height, ensureVisible);
Editor.prototype.setInlineWidgetHeight = function (inlineWidget, height, ensureVisible) {
this._codeMirror.setInlineWidgetHeight(inlineWidget.id, height, ensureVisible);
};


Expand Down

0 comments on commit 25fd303

Please sign in to comment.