app/controllers/maps_controller.rb
#just works with NSEW directions at the moment.
just works with NSEW directions at the moment.
just works with NSEW directions at the moment .
def warp_aligned
    align = params[:align]
    append = params[:append]
    destmap = Map.find(params[:destmap])
    if destmap.status.nil? or destmap.status == :unloaded or destmap.status == :loading
      flash.now[:notice] = "Sorry the destination map is not available to be aligned."
      redirect_to :action => "show", :id=> params[:destmap]
    elsif align != "other"
      if params[:align_type]  == "original"
        destmap.align_with_original(params[:srcmap], align, append )
      else
        destmap.align_with_warped(params[:srcmap], align, append )
      end
      flash.now[:notice] = "Map aligned. You can now rectify it!"
      redirect_to :action => "warp", :id => destmap.id
    else
      flash.now[:notice] = "Sorry, only horizontal and vertical alignment are available at the moment."
      redirect_to :action => "align", :id=> params[:srcmap]
    end
  end
def warp_aligned align = params [ :align ] append = params [ :append ] destmap = Map . find ( params [ :destmap ] ) if destmap . status . nil? or destmap . status == :unloaded or destmap . status == :loading flash . now [ :notice ] = "Sorry the destination map is not available to be aligned." redirect_to :action => "show" , :id => params [ :destmap ] elsif align != "other" if params [ :align_type ] == "original" destmap . align_with_original ( params [ :srcmap ] , align , append ) else destmap . align_with_warped ( params [ :srcmap ] , align , append ) end flash . now [ :notice ] = "Map aligned. You can now rectify it!" redirect_to :action => "warp" , :id => destmap . id else flash . now [ :notice ] = "Sorry, only horizontal and vertical alignment are available at the moment." redirect_to :action => "align" , :id => params [ :srcmap ] end end
just works with NSEW directions at the moment.
just works with NSEW directions at the moment .