ここに本当のパズルがあります。Atalasoft DotImage を使用して、ユーザーが画像に注釈を追加できるようにしています。同じ名前のテキストを含む同じタイプの 2 つの注釈を追加すると、Atalasoft の圧縮された js で javascript 許可拒否エラーが発生します。エラーは、ルールのスタイル メンバーにアクセスしています。
デバッガー (Visual Studio 2010 .Net 4.0) では、h._rule にはアクセスできますが、h._rule.style にはアクセスできません。
オブジェクトのメンバーにアクセスするときに、javascript で許可が拒否される原因は何ですか?
他の誰かがこれに遭遇したかどうか疑問に思っています。SO で Atalasoft を使用している人を何人か見かけます。はい、私は彼らと話していますが、それを群衆に投げ出すのは決して痛いことではありません。これは IE8 でのみ発生し、FireFox では発生しません。ありがとう、ブライアン
更新: はい、最新バージョンを使用: 9.0.2.43666
同じ名前で(以下のコメントを参照)つまり、デフォルトの注釈を作成し、後でjavascriptで追加できるように名前を付けました。
// create a default annotation
TextData text = new TextData();
text.Name = "DefaultTextAnnotation";
text.Text = "Default Text Annotation:\n double-click to edit";
//text.Font = new AnnotationFont("Arial", 12f);
text.Font = new AnnotationFont(_strAnnotationFontName, _fltAnnotationFontSize);
text.Font.Bold = true;
text.FontBrush = new AnnotationBrush(Color.Black);
text.Fill = new AnnotationBrush(Color.Ivory);
text.Outline = new AnnotationPen(new AnnotationBrush(Color.White), 2);
WebAnnotationViewer1.Annotations.DefaultAnnotations.Add(text);
JavaScript の場合:
CreateAnnotation('TextData', 'DefaultTextAnnotation');
function CreateAnnotation(type, name) {
SetAnnotationModified(true);
WebAnnotationViewer1.DeselectAll();
var ann = WebAnnotationViewer1.CreateAnnotation(type, name);
WebThumbnailViewer1.Update();
}