Friday 15 August 2014

javascript - Preventing scaling text while scaling parent div -



javascript - Preventing scaling text while scaling parent div -

now working on project of floor plan map contains amount of rooms – each room beingness represented raphael.js shape, , in middle of shape there’s number of tasks. font size no of tasks needs fixed each shape.

for zooming in:

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

and zooming out similarly:

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

and works fine.

clicking ‘fit screen’ button fits maps screen:

var zoom = (math.min(this._inner.width() / this._mapwidth, this._inner.height() / this._mapheight) * mapzoomfudgefactor); this.zoomto(zoom);

however font gets scaled too. there way stopping it?

javascript zoom raphael scaletransform

No comments:

Post a Comment