فهرست منبع

Fixes #67, decimal inputs for function parameters (like scale)

Torkel Ödegaard 12 سال پیش
والد
کامیت
0a8b9bad4f
3فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 1
      src/app/panels/graphite/funcEditor.html
  2. 1 1
      src/app/services/graphite/parser.js
  3. 1 1
      src/test/specs/gfunc-specs.js

+ 1 - 1
src/app/panels/graphite/funcEditor.html

@@ -20,7 +20,7 @@
           <div ng-switch-when="int">
           <div ng-switch-when="int">
              <input
              <input
                 type="number"
                 type="number"
-                placeholder="seconds"
+                step="any"
                 focus-me="true"
                 focus-me="true"
                 class="input-mini"
                 class="input-mini"
                 ng-change="functionParamsChanged(func)" ng-model-onblur
                 ng-change="functionParamsChanged(func)" ng-model-onblur

+ 1 - 1
src/app/services/graphite/parser.js

@@ -172,7 +172,7 @@ define([
 
 
       return {
       return {
         type: 'number',
         type: 'number',
-        value: parseInt(this.consumeToken().value, 10)
+        value: parseFloat(this.consumeToken().value)
       };
       };
     },
     },
 
 

+ 1 - 1
src/test/specs/gfunc-specs.js

@@ -60,7 +60,7 @@ define([
 
 
     it('should return function categories', function() {
     it('should return function categories', function() {
       var catIndex = gfunc.getCategories();
       var catIndex = gfunc.getCategories();
-      expect(catIndex.Special.length).to.equal(8);
+      expect(catIndex.Special.length).to.be.greaterThan(8);
     });
     });
 
 
   });
   });