viewer.js.orig 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // ******* SITEMAP TOOLBAR VIEWER ACTIONS ******** //
  2. $axure.internal(function ($ax) {
  3. var userTriggeredEventNames = ['onClick','onDoubleClick','onMouseOver','onMouseMove','onMouseOut','onMouseDown','onMouseUp','onKeyDown','onKeyUp','onFocus','onLostFocus','onTextChange','onSelectionChange','onCheckedChange','onSwipeLeft','onSwipeRight','onSwipeUp','onSwipeDown','onDragStart','onDrag','onDragDrop','onScroll','onContextMenu','onMouseHover','onLongClick'];
  4. $ax.messageCenter.addMessageListener(function (message, data) {
  5. //If annotation toggle message received from sitemap, toggle footnotes
  6. if (message == 'annotationToggle') {
  7. if (data == true) {
  8. $('div.annotation').show();
  9. $('div.annnotelabel').show();
  10. $('div.annnoteimage').show();
  11. } else {
  12. $('div.annotation').hide();
  13. $('div.annnotelabel').hide();
  14. $('div.annnoteimage').hide();
  15. }
  16. }
  17. });
  18. $ax.messageCenter.addMessageListener(function (message, data) {
  19. if (message == 'highlightInteractive') {
  20. //Do condition to check if legacy browser (all IE, except 10) and select appropriate pulsate css class name
  21. var userAgentString = navigator.userAgent.toLowerCase();
  22. var isIEpre10 = userAgentString.indexOf('msie 9.') != -1 ||
  23. userAgentString.indexOf('msie 8.') != -1 ||
  24. userAgentString.indexOf('msie 7.') != -1 ||
  25. userAgentString.indexOf('msie 6.') != -1;
  26. var pulsateClassName = isIEpre10 ? 'legacyPulsateBorder' : 'pulsateBorder';
  27. //Find all widgets with a defined userTriggeredEventName specified in the array above
  28. var $matchingElements = $ax(function (obj) {
  29. if (obj.interactionMap) {
  30. for (var index in userTriggeredEventNames) {
  31. if (obj.interactionMap[userTriggeredEventNames[index]]) return true;
  32. }
  33. }
  34. <<<<<<< local
  35. return false;
  36. }).$();
  37. var isHighlighted = $matchingElements.is('.' + pulsateClassName);
  38. var enableHighlight = data == true;
  39. //Toggle the pulsate class on the matched elements
  40. if (enableHighlight && !isHighlighted) {
  41. $matchingElements.addClass(pulsateClassName);
  42. } else if (!enableHighlight && isHighlighted) {
  43. $matchingElements.removeClass(pulsateClassName);
  44. =======
  45. } else if (obj.type == 'flowShape' && obj.referencePageUrl) {
  46. return true;
  47. >>>>>>> other
  48. }
  49. }
  50. });
  51. });