Commits

Thomas Thomassen committed 7958bdf

Fixed: Floating value strings parsed as ints when decimal is comma.
Added: Apply transformation function.

Comments (0)

Files changed (3)

TT_Transformation/core.js

     },
     
     init_buttons : function() {
-      $('#matrixTransformation th button').click( function() {
+      $('#resetEntity').click( function() {
+        cache_transf = Geom.identity_transformation();
+        cache_changed();
+        update_sketchup_matrix();
+      });
+      
+      $('#applyEntity').click( function() {
+        cache_entity = cache_result;
         cache_transf = Geom.identity_transformation();
         cache_changed();
         update_sketchup_matrix();
     var $inputs = $table.find( 'input' );
     var index = $inputs.index( element );
     
-    var value = parseFloat( $(element).val() );
+    var value = parseFloat( $(element).val().replace(',', '.') );
     
     cache[ index ] = value;
     

TT_Transformation/matrix.html

 <tr>
   <th colspan="4">
     Entity#transform!
-    <button>Reset</button>
+    <button id="resetEntity">Reset</button>
+    <button id="applyEntity">Apply</button>
   </th>
 </tr>
 

TT_Transformation/ui.css

 .matrix th {
   position: relative;
 }
-.matrix th button {
-  /*float: right;*/
+
+button#resetEntity {
   position: absolute;
   right: 0.5em;
   top: 0.5em;
 }
+button#applyEntity {
+  position: absolute;
+  left: 0.5em;
+  top: 0.5em;
+}
 
 table {
   width: 100%;