From ad60ae17390bd8549a69b7344cc422905a7bfb3e Mon Sep 17 00:00:00 2001 From: Toks Date: Mon, 20 May 2013 20:35:29 -0400 Subject: [PATCH] Revert "fixes #1648" This reverts commit a11bcf4dbd4faf79d403c97a3bfc73575eb94aa0. --- app/models/note.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/note.rb b/app/models/note.rb index 3f92c6e6b..ccbec9de2 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -113,7 +113,7 @@ class Note < ActiveRecord::Base def note_within_image return false unless post.present? - if x <= 0 || y <= 0 || (x >= post.image_width) || (y >= post.image_height) || width <= 0 || height <= 0 || (x + width >= post.image_width) || (y + height >= post.image_height) + if x < 0 || y < 0 || (x > post.image_width) || (y > post.image_height) || width < 0 || height < 0 || (x + width > post.image_width) || (y + height > post.image_height) self.errors.add(:note, "must be inside the image") return false end