You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever the content hover is resized, the last hover dimensions are stored. Next time the content hover is shown, the maximum dimensions are updated as follows:
The content hover is rendered naturally within these constraints. If the lastHeight and lastWidth are smaller than the default max dimensions, then the current max dimensions are unchanged. Therefore the next rendering of the content hover will be the same as the initial rendering.
The potential issue with this persistance mechanism implementation is that it can cause unexpected resizing of the content hover. The proposal here is to persist the size of the content hover on a per token basis in the editor. In other words, all content hovers dimensions will be persisted on an individual basis.
The text was updated successfully, but these errors were encountered:
Currently the implementation of the persistance mechanism of the content hover works as follows:
The content hover has a default maximum size which is defined as follows:
const defaultMaxHeight = Math.max(this._editor.getLayoutInfo().height / 4, 250);
const defaultMaxWidth = Math.max(this._editor.getLayoutInfo().width * 0.66, 500);
Whenever the content hover is resized, the last hover dimensions are stored. Next time the content hover is shown, the maximum dimensions are updated as follows:
const currentMaxHeight = Math.max(this._editor.getLayoutInfo().height / 4, 250, lastHeight);
const currentMaxWidth = Math.max(this._editor.getLayoutInfo().width * 0.66, 500, lastWidth);
The content hover is rendered naturally within these constraints. If the lastHeight and lastWidth are smaller than the default max dimensions, then the current max dimensions are unchanged. Therefore the next rendering of the content hover will be the same as the initial rendering.
The potential issue with this persistance mechanism implementation is that it can cause unexpected resizing of the content hover. The proposal here is to persist the size of the content hover on a per token basis in the editor. In other words, all content hovers dimensions will be persisted on an individual basis.
The text was updated successfully, but these errors were encountered: