20 |
# |
# |
21 |
# |
# |
22 |
|
|
23 |
|
from __future__ import nested_scopes |
24 |
from org import fenfire as ff |
from org import fenfire as ff |
25 |
from org.fenfire.vocab import CANVAS2D, RDF |
from org.fenfire.vocab import CANVAS2D, RDF |
26 |
import org.nongnu.libvob as vob |
import org.nongnu.libvob as vob |
103 |
|
|
104 |
####### Actions to control nodes on main node plane |
####### Actions to control nodes on main node plane |
105 |
|
|
106 |
class NodeMover(AbstractAction, vob.mouse.RelativeAdapter): |
class NodeMover(AbstractAction, vob.mouse.RelativeAdapter, |
107 |
|
vob.mouse.MousePressListener): |
108 |
|
def pressed(self, x,y): |
109 |
|
self.super() |
110 |
|
self.set(self.main.getNodeOnPlane(self.oldVS, x,y)) |
111 |
|
return self |
112 |
def set(self, node): |
def set(self, node): |
113 |
self.super() |
self.super() |
114 |
s = self.context.states |
s = self.context.states |
125 |
self.pp.moveNote(self.node, ox+x/f.zoom, oy+y/f.zoom ) |
self.pp.moveNote(self.node, ox+x/f.zoom, oy+y/f.zoom ) |
126 |
self.main.chgFast(self.oldVS, -1) |
self.main.chgFast(self.oldVS, -1) |
127 |
|
|
128 |
|
|
129 |
class LinkClick(AbstractAction, vob.mouse.MouseClickListener): |
class LinkClick(AbstractAction, vob.mouse.MouseClickListener): |
130 |
def clicked(self, x,y): |
def clicked(self, x,y): |
131 |
self.super() |
self.super() |