I have read the suggested similar question here:
VertexRenderingFunction (or EdgeRenderingFunction) with movable nodes?
and Mr. Wizard's solution. Please could someone help me to apply his method to my example:

My code is below. I would like the vertices of the graph to move with the pictures of the grids, when I click and drag the grids around.
arraydims = {2, 2};
cases = Tuples[{False, True}, arraydims];
elementsum[array_] := Total[Flatten[array]];
directsuccesorQ[case1_, case2_] := If[
And[
Total[
Boole[MapThread[#1 =!= #2 &, {Flatten[case1],
Flatten[case2]}]]] == 1,
elementsum[Boole[Flatten[case1, 1]]] <
elementsum[Boole[Flatten[case2, 1]]]
],
True, False];
plotsystem[array_] :=
MatrixPlot[array, ColorRules -> {False -> White, True -> Black},
Mesh -> True, Frame -> False, FrameTicks -> False, ImageSize -> 20];
adjacencymatrix =
Table[Boole[directsuccesorQ[cases[[i]], cases[[j]]]], {i, 1,
Length[cases]}, {j, 1, Length[cases]}];
G = AdjacencyGraph[adjacencymatrix];
LayeredGraphPlot[G,
VertexRenderingFunction -> (Inset[plotsystem[cases[[#2]]], #] &),
ImageSize -> Large]
GraphPlotwithLayeredGraphPlotin the definition ofwithVRFand it works as written. I am closing this as a duplicate. $\endgroup$fn = Inset[plotsystem[cases[[#2]]], #] &; LayeredGraphPlot[G, ImageSize -> Large] /. Tooltip[Point[n_Integer], label_] :> fn[n, label]. Or define:withVRFlayered[VRF_][args__] := LayeredGraphPlot[args] /. Tooltip[Point[n_Integer], label_] :> VRF[n, label]and then use:withVRFlayered[Inset[plotsystem[cases[[#2]]], #] &][G, ImageSize -> Large]$\endgroup$