1

現在、一定量の部屋を含むフロア プラン マップのプロジェクトに取り組んでいます。各部屋は Raphael.js 形状として表されており、形状の中央にはいくつかのタスクがあります。フォント サイズ 形状ごとに固定する必要があるタスクの数。

ズームインの場合:

(this._zoom <= 6 && this._zoom > 0) ?
(this.count) ? this._textPaperSet.forEach(function (e) {
e.transform("...s" + (1 / defaultZoomStep));
}) : ''
                : '';

同様にズームアウトします。

(this._zoom >= -0.16) ?
(this.count) ? this._textPaperSet.forEach(function (e) {
e.transform("...s" + (1 * defaultZoomStep));
}) : ''
                : '';

そして、それはうまくいきます。

[画面に合わせる] ボタンをクリックすると、マップが画面に収まります。

var zoom = (Math.min(this._inner.width() / this._mapWidth,
this._inner.height() / this._mapHeight) * mapZoomFudgeFactor);
this.zoomTo(zoom);

ただし、フォントもスケーリングされます。それを止める方法はありますか?

4

0 に答える 0