$("#Textslider").change(function () { var textsize = null; if (getSelectedLayer() != null) { textsize = $(this).val(); var canvasobj = getSelectedLayer(); canvasobj.fontSize = textsize; this.context = canvasobj.context; this.textWidth = this.context.measureText(canvasobj.content).width; this.textHeight = (parseInt(textsize) + (textsize / 4)); jCollage.TextResize(this.textWidth, this.textHeight, textsize, canvasobj, this.context); //jCollage.redraw(); } }); this.TextResize = function (textWidth, textHeight, fontSize, selectedLayer, context) { this.fontSize = fontSize; this.selectedLayer = selectedLayer; this.context = context; this.textWidth = textWidth; this.textHeight = textHeight; this.selectedLayer.scale(parseInt(this.textWidth + 30), this.textHeight); drawMarker(this.selectedLayer); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)