Whereas Edit > Copy As > AppleScript already includes the User Data record/dictionary of a shape, Copy as JavaScript seems to drop it, or perhaps has, as yet, no access to it.
(OG Test 7.3 – 177.3.0.283059)
Compare the output of Copy As AppleScript:
tell application id "com.omnigroup.OmniGraffle7"
tell canvas of front window
make new shape at end of graphics with properties
{user name: "m12lZufh3L7", corner radius: 9, draws stroke: false,
size: {100.000000, 100.000000}, text: {alignment: center,
text: "How do we iterate on text overflow ?"},
origin: {1275.000000, 172.000000}, magnets: {{0, -1}, {0, 1}},
-- USER DATA
user data: {gamma: "1.6", alpha: "101", beta: "ver 2.3"}}
end tell
end tell
with that of Copy As JavaScript:
var canvas = document.windows[0].selection.canvas
var g1 = canvas.newShape()
g1.cornerRadius = 9
g1.text = "How do we iterate on text overflow ?"
g1.name = "m12lZufh3L7"
g1.textSize = 12
g1.strokeType = null
g1.geometry = new Rect(1275.00, 172.00, 100.00, 100.00)
g1.strokeColor = null