Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widget values now use value formatter #562

Merged
merged 12 commits into from Mar 23, 2016

Further adjustment to widget font size adjustment

  • Loading branch information...
Philipp Rudiger Philipp Rudiger
Philipp Rudiger authored and Philipp Rudiger committed Mar 23, 2016
commit 40cf1d11b9d992950f027a0630d433c2751777a6
@@ -95,11 +95,8 @@
var step = 1;
}
function adjustFontSize(text) {
if (text.val().length > 8) {
size = 100-Math.min(text.val().length*2.5, 50)+'%';
} else {
size= '100%';
}
var width_ratio = (text.parent().width()/8)/text.val().length;
var size = Math.min(0.9, Math.max(0.6, width_ratio))+'em';
text.css('font-size', size);
}
var slider = $('#_anim_widget{{ id }}_{{ widget_data['dim'] }}');
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.