mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
1 parent
b85b3bc27d
commit
bbc8d59bdb
11 files changed
+165
-39
No files matched your search
+15
-5
@@ -961,13 +961,23 @@ func (x *ofdXML) actions(actions []Action) {
|
||||
attrs := ofdAttrs{{Name: xml.Name{Local: "Type"}, Value: dest.Type}, {Name: xml.Name{Local: "PageID"}, Value: dest.PageID}}
|
||||
switch dest.Type {
|
||||
case "XYZ":
|
||||
attrs.add("Left", ofdNumber(dest.Left))
|
||||
attrs.add("Top", ofdNumber(dest.Top))
|
||||
attrs.add("Zoom", ofdNumber(dest.Zoom))
|
||||
if !dest.OmitLeft {
|
||||
attrs.add("Left", ofdNumber(dest.Left))
|
||||
}
|
||||
if !dest.OmitTop {
|
||||
attrs.add("Top", ofdNumber(dest.Top))
|
||||
}
|
||||
if !dest.OmitZoom {
|
||||
attrs.add("Zoom", ofdNumber(dest.Zoom))
|
||||
}
|
||||
case "FitH":
|
||||
attrs.add("Top", ofdNumber(dest.Top))
|
||||
if !dest.OmitTop {
|
||||
attrs.add("Top", ofdNumber(dest.Top))
|
||||
}
|
||||
case "FitV":
|
||||
attrs.add("Left", ofdNumber(dest.Left))
|
||||
if !dest.OmitLeft {
|
||||
attrs.add("Left", ofdNumber(dest.Left))
|
||||
}
|
||||
case "FitR":
|
||||
attrs.add("Left", ofdNumber(dest.Left))
|
||||
attrs.add("Right", ofdNumber(dest.Right))
|
||||
|
||||
Reference in new issue
Block a user