How can I make straight line between two nodes when one node, for example, above another one and shorter.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usetikzlibrary{positioning}
\usepackage{amsmath,bm,times}
\usepackage{verbatim}
\begin{document}
\pagestyle{empty}
% We need layers to draw the block diagram
\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}
% Define a few styles and constants
\tikzstyle{sensor}=[draw, fill=blue!20, text width=5em,
text centered, minimum height=2.5em]
\tikzstyle{sensor}=[draw, fill=blue!20, text width=5em,
text centered, minimum height=2.5em]
\tikzstyle{ann} = [above, text width=5em]
\tikzstyle{naveqs} = [sensor, text width=6em, fill=red!20,
minimum height=12em, rounded corners]
\tikzstyle{mainblock} = [above,sensor, text width=6em, fill=yellow!20,
minimum height=12em, rounded corners, dashed]
\tikzstyle{main} = [rounded corners, fill=yellow!20,
minimum width=7cm,minimum height=5cm, text centered]
\tikzstyle{submain} = [node distance=0.4cm, rounded corners, fill=red!20,
minimum width=6.5cm,minimum height=0.7cm, text centered, draw, rectangle]
\tikzstyle{subsubmain} = [node distance=0.2cm, rounded corners, fill=green!20,
minimum width=6cm,minimum height=0.7cm, text centered, draw, rectangle]
\tikzstyle{header} = [submain, fill=blue!10]
\def\blockdist{2.3}
\def\edgedist{2.5}
\begin{tikzpicture}[scale=3.0]
\node (mobprint)[main,draw,rectangle] {};
\path (mobprint.north) node (exper) [header] {MobilePrint Application};
\node (gui) [submain,below=of exper] {GUI Interface};
\node (pssub) [submain, below=of gui, minimum height=3cm] {Subsystem};
\node (opmap) [subsubmain, above=0.1cm of pssub.south,
minimum width] {Option Mapping};
\node (storage) [subsubmain, above left=0.4cm and 0cm of opmap.north east, minimum width=3cm] {Compressed Storage};
\path [draw, ->] (storage) -- (opmap);
\draw (storage) edge (opmap);
\end{tikzpicture}
\end{document}
P.S.: I wish to connect (storage) "Compressed Storage" to (opmap) "Option Mapping"
storage
to the upper right part ofmapping
andpssub
to the upper left part ofmapping
?\draw [->] (storage) -- (storage |- opmap.north);