Skip to content
Snippets Groups Projects
Commit 60f1358d authored by Ryan Seys's avatar Ryan Seys
Browse files

Fix undo bug

parent 69416386
No related branches found
No related tags found
No related merge requests found
File mode changed from 100755 to 100644
......@@ -121,13 +121,13 @@ def processUndoEvents
end
end
if(closest_shape != nil)
$undos[closest_shape] = undo[:timestamp]
$undos[closest_shape] = ((undo[:timestamp].to_f - $join_time)/1000).round(1)
end
end
$undos_temp = {}
$undos.each do |un, val|
$undos_temp[un[:timestamp]] = val
$undos_temp[((un[:timestamp].to_f - $join_time)/1000).round(1)] = val
end
$undos = $undos_temp
BigBlueButton.logger.info("Undos: #{$undos}")
......@@ -312,10 +312,10 @@ def processShapesAndClears
# figure out undo time
BigBlueButton.logger.info("Figuring out undo time")
if($undos.has_key? shape[:timestamp])
$shapeUndoTime = (($undos[shape[:timestamp]].to_f - $join_time)/1000).round(1)
if($undos.has_key? ((shape[:timestamp].to_f - $join_time)/1000).round(1))
undo_time = $undos[((shape[:timestamp].to_f - $join_time)/1000).round(1)]
else
$shapeUndoTime = -1
undo_time = -1
end
clear_time = -1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment