mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 13:56:32 +08:00
1 parent
5e0da3da28
commit
ee6c9f6a16
82 files changed
+4316
-4310
No files matched your search
+15
-15
@@ -126,21 +126,6 @@ type actionSource struct {
|
||||
Path string
|
||||
}
|
||||
|
||||
// gotoDest 获取文档内跳转目标
|
||||
// 入参: action 跳转动作, bookmarks 书签
|
||||
// 返回: *Dest 跳转目标
|
||||
func gotoDest(action *Goto, bookmarks map[string]Dest) *Dest {
|
||||
if action.Dest != nil {
|
||||
return action.Dest
|
||||
}
|
||||
if action.Bookmark != nil {
|
||||
if dest, ok := bookmarks[action.Bookmark.Name]; ok {
|
||||
return &dest
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// UnmarshalXML 解析跳转目标
|
||||
// 入参: d XML解码器, start 起始节点
|
||||
// 返回: error 错误信息
|
||||
@@ -242,6 +227,21 @@ func (a *RegionArea) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
|
||||
}
|
||||
}
|
||||
|
||||
// gotoDest 获取文档内跳转目标
|
||||
// 入参: action 跳转动作, bookmarks 书签
|
||||
// 返回: *Dest 跳转目标
|
||||
func gotoDest(action *Goto, bookmarks map[string]Dest) *Dest {
|
||||
if action.Dest != nil {
|
||||
return action.Dest
|
||||
}
|
||||
if action.Bookmark != nil {
|
||||
if dest, ok := bookmarks[action.Bookmark.Name]; ok {
|
||||
return &dest
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// actionFloatAttr 获取动作浮点属性
|
||||
// 入参: start 起始节点, name 属性名
|
||||
// 返回: float64 属性值
|
||||
|
||||
Reference in new issue
Block a user