user6483684 user6483684 - 4 months ago 24
Javascript Question

curve text straight javascript

i would like to know how I can make curve text straight again using javascript I have tried adjusting the code but nothing seems to work.



$("#demo1").circleType({
radius: 100
});

$("#demo2").circleType({
radius: 100,
dir: -1
});

$("#demo4").circleType(
'none'
);

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://circletype.labwire.ca/js/circletype.js"></script>
<script src="http://tympanus.net/Development/Arctext/js/jquery.arctext.js"></script>

<div id="curveup">
<p id="demo1">Curve Down.</p>
</div>
<div id="curvedown">
<p id="demo2">Curve UP.</p>
</div>
<div id="norotation">
<p id="demo4">No Rotation.</p>
</div>




Answer

You can reset the innerText like this if you liked.

$("#demo1").circleType({ radius: 100 });
$("#demo2").circleType({ radius: 100, dir: -1 });
$("#demo4").circleType('none');

$("#undo").on("click", function(){
  $("#demo1").text( $("#demo1").text() );
  $("#demo2").text( $("#demo2").text() );
  $("#demo4").text( $("#demo4").text() );
});
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://circletype.labwire.ca/js/circletype.js"></script>
<script src="http://tympanus.net/Development/Arctext/js/jquery.arctext.js"></script>

<div id="curveup"><p id="demo1">Curve Down.</p></div>
<div id="curvedown"><p id="demo2">Curve UP.</p></div>
<div id="norotation"><p id="demo4">No Rotation.</p></div>

<button id="undo">undo</button>

Comments