stathissideris / dali

dali is a Clojure library for representing, exporting and manipulating the SVG graphics format.
296 stars 16 forks source link

Problem using :dali/connect #15

Closed setzer22 closed 5 years ago

setzer22 commented 5 years ago

Trying to render one of the examples provided results in the following error:

No method in multimethod 'layout-nodes' for dispatch value: :dali/connect

The code:

(io/render-svg
 [:dali/page {:stroke :black :fill :none}
  [:defs (prefab/sharp-arrow-marker :sharp)]
  [:dali/connect {:from :a :to :b :dali/marker-end :sharp}]
  [:dali/stack {:direction :right, :gap 50}
   [:rect {:id :a} [50 50] [50 50]]
   [:rect {:id :b} [50 150] [50 50]]]]
 "/tmp/stack.svg")

This error usually occurs when I am missing a require, but I already tried requiring all the namespaces from the examples clj file, and nothing seems to work. Is there anything I need to do for this to work?

setzer22 commented 5 years ago

Nevermind, I was missing a (:require [dali.layout.connect]) in my ns form. Sorry about that!