##// END OF EJS Templates
Resolving conflict in utils.js.
Brian Granger -
Show More
@@ -126,12 +126,24 IPython.utils = (function (IPython) {
126 126 DOWN : 40,
127 127 };
128 128
129
130 points_to_pixels = function (points) {
131 // A reasonably good way of converting between points and pixels.
132 var test = $('<div style="display: none; width: 10000pt; padding:0; border:0;"></div>');
133 $(body).append(test);
134 var pixel_per_point = test.width()/10000;
135 test.remove();
136 return Math.floor(points*pixel_per_point);
137 }
138
139
129 140 return {
130 141 uuid : uuid,
131 142 fixConsole : fixConsole,
132 143 keycodes : keycodes,
133 144 grow : grow,
134 145 fixCarriageReturn : fixCarriageReturn
146 points_to_pixels : points_to_pixels
135 147 };
136 148
137 149 }(IPython));
General Comments 0
You need to be logged in to leave comments. Login now