% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RCyjs-class.R
\name{layoutSelectionInGridInferAnchor,RCyjs-method}
\alias{layoutSelectionInGridInferAnchor,RCyjs-method}
\alias{layoutSelectionInGridInferAnchor}
\title{layoutSelectionInGridInferAnchor}
\usage{
\S4method{layoutSelectionInGridInferAnchor}{RCyjs}(obj, w, h)
}
\arguments{
\item{obj}{an RCyjs instance}

\item{w}{numeric, the width of the grid box}

\item{h}{numeric, the height of the grid box}
}
\value{
explain what the method returns
}
\description{
\code{layoutSelectionInGridInferAnchor} the top-most, left-most of the selected nodes is the anchor
}
\details{
anchor (the top left) of the grid is the location of the topmost/leftmost node, then arrange
all the selected nodes in a box anchored here.
}
\examples{
if(interactive()){
   g <- simpleDemoGraph()
   rcy <- RCyjs(title="rcyjs demo", graph=g)
   layout(rcy, "cose")
   fit(rcy, 100)
   loadStyleFile(rcy, system.file(package="RCyjs", "extdata", "sampleStyle2.js"));
   selectNodes(rcy, nodes(g))
   layoutSelectionInGrid(rcy, -1000, 10, 100, 400)
   }

}
