Make sure Relation#rel are floats.
authorTilman Sauerbeck <tilman@code-monkey.de>
Mon, 19 Sep 2005 20:17:07 +0000 (20:17 +0000)
committerTilman Sauerbeck <tilman@code-monkey.de>
Mon, 19 Sep 2005 20:17:07 +0000 (20:17 +0000)
ChangeLog
lib/redact/part.rb

index da13ac24a13a412c1bbcf62914c4baa60b02d19c..0d8db550bd89a865032d815fc84bfc969f2464e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,5 @@
 --
-$Id: ChangeLog 68 2005-09-19 20:03:09Z tilman $
+$Id: ChangeLog 69 2005-09-19 20:17:07Z tilman $
 ++
 
 2005-09-19 Tilman Sauerbeck (tilman at code-monkey de)
@@ -7,6 +7,7 @@ $Id: ChangeLog 68 2005-09-19 20:03:09Z tilman $
           used the "right" argument for the "left" border
         * lib/redact/part.rb: Set "dragable.events_id" to -1 until it's
           properly implemented
+        * lib/redact/part.rb: Make sure Relation#rel are floats
 
 2005-08-25 Tilman Sauerbeck (tilman at code-monkey de)
         * Released version 0.1.4
index d285c19dba139d61cd8ce5dfcd5613b2bca2b426..692a48793d757ab87d3a1c44ece009ed61a2be81 100644 (file)
@@ -1,5 +1,5 @@
 #--
-# $Id: part.rb 68 2005-09-19 20:03:09Z tilman $
+# $Id: part.rb 69 2005-09-19 20:17:07Z tilman $
 #
 # Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de)
 #
@@ -203,13 +203,13 @@ module Redact
                attr_reader :rel, :to_id, :offset
 
                def initialize(rel, offset)
-                       @rel = [rel, rel]
+                       @rel = [rel.to_f, rel.to_f]
                        @to_id = [-1, -1]
                        @offset = [offset, offset]
                end
 
                def set_rel(x, y)
-                       @rel = [x, y]
+                       @rel = [x.to_f, y.to_f]
                end
 
                def set_offset(x, y)